ClickHouse/tests/queries/0_stateless/03093_analyzer_column_alias.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
508 B
MySQL
Raw Normal View History

2024-04-10 17:13:03 +00:00
-- https://github.com/ClickHouse/ClickHouse/issues/26674
SET allow_experimental_analyzer = true;
SELECT
Carrier,
sum(toFloat64(C3)) AS C1,
sum(toFloat64(C1)) AS C2,
sum(toFloat64(C2)) AS C3
FROM
(
SELECT
1 AS Carrier,
count(CAST(1, 'Nullable(Int32)')) AS C1,
max(number) AS C2,
min(number) AS C3
FROM numbers(10)
GROUP BY Carrier
) AS ITBL
GROUP BY Carrier
LIMIT 1000001
SETTINGS prefer_column_name_to_alias=1;