ClickHouse/tests/queries/0_stateless/02293_grouping_function_group_by.sql
2022-05-13 23:04:12 +00:00

19 lines
325 B
SQL

SELECT
number,
grouping(number, number % 2, number % 3) = 6
FROM remote('127.0.0.{2,3}', numbers(10))
GROUP BY
number,
number % 2
ORDER BY number;
SELECT
number,
grouping(number),
GROUPING(number % 2)
FROM remote('127.0.0.{2,3}', numbers(10))
GROUP BY
number,
number % 2
ORDER BY number;