Hi,
I have a following smaple query:

select
A,
CASE
 WHEN B IN(1,2) THEN 'Type A'
 ELSE 'Type B'
END AS B,
C
from table_a
groupby
A, B, C;

But when i run this query, it gives error:
FAILED: Error in semantic analysis: Line 95:0 Invalid table alias or column
reference entity

This error is from B defined after 'AS' in CASE statement.

how can I make this group-by work ?

Thanks,
-JJ

Reply via email to