ClickHouse/tests/queries/0_stateless/02482_if_with_nothing_argument.sql

4 lines
118 B
SQL

select [] as arr, if(empty(arr), 0, arr[-1]);
select [] as arr, multiIf(empty(arr), 0, length(arr) > 1, arr[-1], 0);