Created
April 26, 2024 00:27
-
-
Save BRonen/1b222f5b17e45f559c99b5b7a11e1349 to your computer and use it in GitHub Desktop.
fibonnaci with sql recursive queries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with recursive fib as ( | |
select 0 as a, 1 as b | |
union | |
select b, a + b from fib | |
) select a from fib limit 5; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment