SUMIF, COUNTIFS and pivot tables in SQL · exercise 1 of 1 · free preview
SUMIF(range, "pastry", sum_range) becomes a SUM with a WHERE on the category. Here the category lives in another table, so join first.
How many items in total were sold from the 'pastry' category? Name the total units.
Tables in this practice shop
customersproductsordersorder_items