ClickHouse/tests/queries/0_stateless/03111_inner_join_group_by.sql
2024-08-05 15:29:14 +00:00

19 lines
352 B
SQL

-- https://github.com/ClickHouse/ClickHouse/issues/50705
set enable_analyzer=1;
SELECT
count(s0.number),
s1.half
FROM system.numbers AS s0
INNER JOIN
(
SELECT
number,
number / 2 AS half
FROM system.numbers
LIMIT 10
) AS s1 ON s0.number = s1.number
GROUP BY s0.number > 5
LIMIT 10 -- {serverError NOT_AN_AGGREGATE}