Every Pi Day (3.14), math students, using fake but famous mathematicians’ names, flock to The Golden Ratio Bakery to enjoy their favorite π-themed pies. Instead of picking a random dessert, they select their treat based on the legendary mathematician they admire most.
Alan Turing Apple Pie 9.99£
Ada Lovelace Cherry Pie 12.5£
Carl Gauss Pumpkin Pie 15.00£
Srinivasa Ramanujan Chocolate Pie 8.75£
Katherine Johnson Blueberry Pie 10.99£
Euclid Raspberry Pie 11.25£
Johannes Kepler Strawberry Pie 14.50£
Leonhard Euler Peach Pie 14.99£
Pythagoras Blackberry Pie 9.75£
Fibonacci Mango Pie 13.50£
Sophie Germain Mixed Berry Pie 10.00£
Pierre-Simon Laplace Banana Cream Pie 12.25£
Blaise Pascal Lemon Meringue Pie 11.99£
Hypatia Key Lime Pie 10.75£
John von Neumann Pear Pie 13.99£
Joseph Fourier Apricot Pie 14.25£
Gottfried Wilhelm Leibniz Plum Pie 15.75£
David Hilbert Fig Pie 16.00£
Bernhard Riemann Walnut Pie 14.50£
Niels Bohr Almond Pie 13.25£
Johann Bernoulli Cranberry Pie 12.75£
Henri Poincaré Plum Tart 14.00£
Emmy Noether Coconut Cream Pie 15.99£
Georg Cantor Infinite Layer Pie 17.77£
This year, demand is through the roof, and the usual sequential order processing is causing frustrating delays. Mathematicians—real or not—are notoriously impatient and expect instant, parallel execution for their pie requests.
To avoid a pie-induced catastrophe, we need to optimize the order system by leveraging Snowflake’s ASYNC execution to process multiple mathematicians’ orders simultaneously and return the updated list of satisfied customers without delays.
Your task is to speed up pie order processing by inserting two mathematicians’ pie orders asynchronously using ASYNC, ensuring both inserts complete before returning results using AWAIT, and returning the updated order list sorted by order_id so we know which legendary mind—or at least their name—got their pie first.

Happy Pi Day to all!
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.
Leave a Reply
You must be logged in to post a comment.