Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
11
Task/Anonymous-recursion/DuckDB/anonymous-recursion.duckdb
Normal file
11
Task/Anonymous-recursion/DuckDB/anonymous-recursion.duckdb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
create or replace function fib(n) as (
|
||||
if ( n < 0, error('negative arguments not allowed'),
|
||||
(with recursive fib(i,e,f) as (
|
||||
select 1, 1, 1
|
||||
union all
|
||||
select i+1, e+f, e from fib
|
||||
where i <= n)
|
||||
select last(f order by i)
|
||||
from fib)
|
||||
)
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue