ClickHouse/tests/queries/0_stateless/02943_positional_arguments_bugs.sql
2023-12-13 13:14:00 +01:00

24 lines
357 B
SQL

-- https://github.com/ClickHouse/ClickHouse/issues/46628
DROP TABLE IF EXISTS t;
CREATE TABLE t
(
`n` int
)
ENGINE = MergeTree
ORDER BY n AS
SELECT *
FROM numbers(10);
SELECT
sum(n),
1 AS x
FROM t
GROUP BY x;
SELECT
'processed' AS type,
max(number) AS max_date,
min(number) AS min_date
FROM numbers(100)
GROUP BY type;