ClickHouse/tests/queries/0_stateless/03111_inner_join_group_by.sql

18 lines
363 B
SQL

-- https://github.com/ClickHouse/ClickHouse/issues/50705
set allow_experimental_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}