1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Snowflake

Exercise

Functions & Grouping

As a freelancer at Pissa, you're examining pizza order details. As the team dives deeper into the sales data, there's a need to focus on orders with larger quantities to ensure efficient service and delivery.

Using your knowledge of aggregate functions, sorting, and grouping, complete the query to analyze and prioritize these bulk orders.

Instructions

100 XP
  • Retrieve the order_id and pizza_id for orders where the total quantity of pizzas exceeds 3 using HAVING clause.
  • Group the orders using GROUP BY ALL
  • Arrange your results by order_id and then by total_quantity in a descending sequence.