mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-25 01:10:37 +00:00
* feat: support "use catalog and schema"(behave like the "use" in MySQL) in GRPC requests * fix: rebase develop
28 lines
572 B
SQL
28 lines
572 B
SQL
USE public;
|
|
|
|
SELECT SUM(number) FROM numbers;
|
|
|
|
SELECT SUM(1) FROM numbers;
|
|
|
|
SELECT SUM(-1) FROM numbers;
|
|
|
|
SELECT SUM(-1) FROM numbers WHERE number=-1;
|
|
|
|
SELECT SUM(-1) FROM numbers WHERE number>10000 limit 1000;
|
|
|
|
CREATE TABLE bigints(b BIGINT TIME INDEX);
|
|
|
|
INSERT INTO bigints values (4611686018427387904), (4611686018427388904), (1);
|
|
|
|
SELECT SUM(b) FROM bigints;
|
|
|
|
CREATE TABLE doubles(n DOUBLE, ts BIGINT TIME INDEX);
|
|
|
|
INSERT INTO doubles (n, ts) VALUES (9007199254740992, 1), (1, 2), (1, 3), (0, 4);
|
|
|
|
SELECT sum(n) from doubles;
|
|
|
|
DROP TABLE bigints;
|
|
|
|
DROP TABLE doubles;
|