mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 22:12:21 +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);
|
|
|