The world of JOINS
Previously, you generated insights for Pissa around their sales and revenue by month. Now, you'll look into their most popular pizzas.
Apply your knowledge of joins to get the desired result.
This exercise is part of the course
Introduction to Snowflake SQL
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
SELECT COUNT(o.order_id) AS total_orders,
AVG(p.price) AS average_price,
-- Calculate total revenue
___ AS total_revenue
FROM orders AS o
LEFT JOIN order_details AS od
ON o.order_id = od.order_id
-- Use an appropriate JOIN with the pizzas table
___ AS p
ON od.pizza_id = p.pizza_id