Skip to content
Exercise · Set operations and CTEs · lesson 10 of 10

Exercise: a shop's average check

A shop's average check is the average total of its orders. An order's total is the sum of qty * price over all its rows in order_items, and menu_items holds each item's price. Write a query that returns, for each shop with orders, its name from shops and its average check: columns shop and avg_check. Round the average check to two decimal places.