Files
greptimedb/tests/cases/standalone/aggregate/sum.sql
dennis zhuang 9428e70971 feat: integration test (#770)
* feat: add insert test cases

* fix: update results after rebase develop

* feat: supports unsigned integer types and big_insert test

* test: add insert_invalid test

* feat: supports time index constraint for bigint type

* chore: time index column at last

* test: adds more order, limit test

* fix: style

* feat: adds numbers table in standable memory catalog mode

* feat: enable fail_fast and test_filter in sqlness

* feat: add more tests

* fix: test_filter

* test: add alter tests

* feat: supports if_not_exists when create database

* test: filter_push_down and catalog test

* fix: compile error

* fix: delete output file

* chore: ignore integration test output in git

* test: update all integration test results

* fix: by code review

* chore: revert .gitignore

* feat: sort the show tables/databases results

* chore: remove issue link

* fix: compile error and code format after rebase

* test: update all integration test results
2023-01-10 18:15:50 +08:00

26 lines
559 B
SQL

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;