mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-08 15:31:57 +00:00
36 lines
502 B
SQL
36 lines
502 B
SQL
-- https://github.com/ClickHouse/ClickHouse/issues/45535
|
|
SET allow_experimental_analyzer=1;
|
|
|
|
SELECT
|
|
*,
|
|
count() OVER () AS c
|
|
FROM numbers(10)
|
|
ORDER BY toString(number);
|
|
|
|
|
|
WITH
|
|
toString(number) as str
|
|
SELECT
|
|
*,
|
|
count() OVER () AS c
|
|
FROM numbers(10)
|
|
ORDER BY str;
|
|
|
|
SELECT
|
|
*,
|
|
count() OVER () AS c,
|
|
toString(number) as str
|
|
FROM numbers(10)
|
|
ORDER BY str;
|
|
|
|
|
|
WITH
|
|
test AS (
|
|
SELECT
|
|
*,
|
|
count() OVER () AS c
|
|
FROM numbers(10)
|
|
)
|
|
SELECT * FROM test
|
|
ORDER BY toString(number);
|