This week , the Intern was given a problem that he can’t seem to fix. Professor Frosty was quite taken with his own brilliant idea though so the Intern doesn’t want to disappoint.
It’s a challenge that some of you might’ve seen before : FizzBuzz.
Before everyone starts digging through old pieces of their own leetcode to find their solution , Professor Frosty gave this challenge with a twist : FizzBuzz with SQL.
The challenge for this week :
Write a SQL query that outputs numbers from 1 to 100, but with a twist:
• For multiples of 3, output “Fizz” instead of the number.
• For multiples of 5, output “Buzz” instead of the number.
• For multiples of both 3 and 5, output “FizzBuzz”.
You are allowed to use any tables that you’d like to construct to make the query easier.
The expected output looks something like this

Remember if you want to participate:
- Sign up as a member of Frosty Friday. You can do this by clicking on the sidebar, and then going to ‘REGISTER‘ (note joining our mailing list does not give you a Frosty Friday account)
- Post your code to GitHub and make it publicly available (Check out our guide if you don’t know how to here)
- Post the URL in the comments of the challenge.
Oh, this reminds me of some FizzFuzzDrink days 🙂
There are multiple ways to solve this with pure SQL, so I thought it would be interesting to prompt CORTEX.COMPLETE for the output.