ClickHouse/tests/queries/0_stateless/02808_aliases_inside_case.sql
2023-06-24 08:08:16 +02:00

11 lines
264 B
SQL

# We support specifying aliases in any place in the query, including CASE expression:
with arrayJoin([1,2]) as arg
select arg,
(case
when arg = 1
then 1 as one
when arg = 2
then one / 2
end) as imposible;