ClickHouse/dbms/tests/queries/0_stateless/00597_with_totals_on_empty_set.sql
2018-03-03 04:28:13 +03:00

7 lines
587 B
SQL

SELECT count() FROM numbers(10) WHERE number = -1 WITH TOTALS FORMAT Vertical;
SELECT count() FROM numbers(10) WHERE number = -1 GROUP BY number WITH TOTALS FORMAT Vertical;
SELECT number, count() FROM numbers(10) WHERE number = -1 GROUP BY number WITH TOTALS FORMAT Vertical;
SELECT groupArray(number) FROM numbers(10) WHERE number = -1 WITH TOTALS FORMAT Vertical;
SELECT groupArray(number) FROM numbers(10) WHERE number = -1 GROUP BY number WITH TOTALS FORMAT Vertical;
SELECT number, groupArray(number) FROM numbers(10) WHERE number = -1 GROUP BY number WITH TOTALS FORMAT Vertical;