mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 10:31:57 +00:00
4 lines
118 B
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);
|
|
|