|
create or replace function MakeList(sep, n) as (
|
|
select list_transform( range(1, n+1),
|
|
-- An inner function:
|
|
i -> format('{}{} {}',
|
|
i,
|
|
sep,
|
|
if(i=1, 'first', if (i=2, 'second', if (i=3, 'third' , '...')))) )
|
|
.array_to_string(chr(10))
|
|
);
|
|
|
|
.mode list
|
|
select MakeList('.', 3) ;
|