Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
12
Task/Nested-function/DuckDB/nested-function.duckdb
Normal file
12
Task/Nested-function/DuckDB/nested-function.duckdb
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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) ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue