PostgreSQL: Fibonacci Series Function for Database Developer Interview

In this post, I am sharing one user define function to generate Fibonacci Series in PostgreSQL.

Today Morning, I have started to take the interview for PostgreSQL Database Developer.

Generally, I am asking complex SQL Query, but this time I have asked to implement few mathematical logics like: “Write a small function to generate Fibonacci Series”.
Fibonacci Series means a series of numbers in which each number is the sum of the two preceding numbers.
e.g 1, 1, 2, 3, 5, 8, 13…

I am sharing this solution here, Database Developer should prepare yourself because Interviewer like, me can ask this kind of question.

Fibonacci Series Function:

Execute Function to generate Fibonacci Series upto 50:


Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from dbrnd.com

Leave a Reply

Be the First to Comment!

Notify of
avatar

wpDiscuz