Files
greptimedb/tests/cases/standalone/aggregate/distinct.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

20 lines
509 B
SQL

CREATE TABLE test (a INTEGER, b INTEGER, t BIGINT TIME INDEX);
INSERT INTO test VALUES (11, 22, 1), (13, 22, 2), (11, 21, 3), (11, 22, 4);
SELECT DISTINCT a, b FROM test ORDER BY a, b;
SELECT DISTINCT test.a, b FROM test ORDER BY a, b;
SELECT DISTINCT a FROM test ORDER BY a;
SELECT DISTINCT b FROM test ORDER BY b;
SELECT DISTINCT a, SUM(B) FROM test GROUP BY a ORDER BY a;
SELECT DISTINCT MAX(b) FROM test GROUP BY a;
SELECT DISTINCT CASE WHEN a > 11 THEN 11 ELSE a END FROM test;
DROP TABLE test;