Skip to content
Exercise · Keys and relationships · lesson 9 of 10

Exercise: orders by shop

The manager wants to know how many orders in each shop come from guests who left no details. Write a query on the orders table that returns, for each shop, the columns shop_id, orders and walk_ins: orders is the number of its orders, walk_ins the number of orders whose customer_id is NULL.