Skip to content

Instantly share code, notes, and snippets.

@zaltoprofen
Created June 18, 2014 10:29
Show Gist options
  • Save zaltoprofen/5bc3443383ea31c33b5d to your computer and use it in GitHub Desktop.
Save zaltoprofen/5bc3443383ea31c33b5d to your computer and use it in GitHub Desktop.
WITH RECURSIVE _fib(a, b) AS (
SELECT 1,0
UNION ALL
SELECT b, a+b FROM _fib
), fib AS (
SELECT b FROM _fib
)
SELECT * FROM fib LIMIT 100;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment