-- fibonacci with recursive fib (n, a, b) as ( select 0, cast(0 as decimal), cast(1 as decimal) union all select n + 1, b, a + b from fib where n < 100 ) select n, a from fib;