blob: f326c4bca4b332f20ee19648fc4585ea8c5ed59e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/* postgres can not */
USE plato;
PRAGMA DisableSimpleColumns;
--INSERT INTO Output
SELECT
hundred_keys, sum(cast(data.subkey as uint32)) -- should use backticks or brackets
FROM (
SELECT data.key as dkey, data.*
FROM Input as data
) as middle
GROUP BY
cast(middle.dkey as uint32)/100 as hundred_keys
ORDER BY hundred_keys
|