Common Table Expression for Fibonacci
More for my amusement than anything; the following t-sql query utilizing a common table expression can be used to show the beginning of the Fibonacci sequence, as well as it’s convergence and relationship with the golden ratio.
Note that this is a more simple version of the fibonacci CTE found on Manoj Pandey’s blog. I’ve simplified his CTE, removing an unnecessary field, only to complicate it up again with the additional ratio calculation.