You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UNKNOWN_IDENTIFIER instead of NOT_AN_AGGREGATE in a query with INNER JOIN and GROUP BY #50705
Received exception from server (version 23.5.1):
Code: 47. DB::Exception: Received from localhost:9000. DB::Exception: Unknown column: half, there are only columns greater(number, 5), count(number). (UNKNOWN_IDENTIFIER)
instead of the expected
Received exception from server (version 23.5.1):
Code 215: <...> Column half is not under aggregate function and not in GROUP BY <...> (NOT_AN_AGGREGATE)
Note that the suggested available columns in the error message are not columns but expressions from select and group by: columns greater(number, 5), count(number)
set allow_experimental_analyzer=1;
SELECTcount(s0.number),
s1.halfFROMsystem.numbersAS s0
INNER JOIN
(
SELECTnumber,
number/2AS half
FROMsystem.numbersLIMIT10
) AS s1 ONs0.number=s1.numberGROUP BYs0.number>5LIMIT10
DB::Exception: Column s1.half is not under aggregate function and not inGROUP BY keys.
(NOT_AN_AGGREGATE)
Activity
ruslandoga commentedon Jun 8, 2023
Note that the suggested available columns in the error message are not columns but expressions from
selectandgroup by:columns greater(number, 5), count(number)den-crane commentedon Jun 27, 2023
solved in analyzer
https://fiddle.clickhouse.com/7fd3e5a3-1b95-4cb6-a2de-e959c38c61dd
Close: #50705
ruslandoga commentedon Apr 16, 2024
@nikitamikhaylov thank you!