Products in Every Category
EasyDescription
For every category, show category_name and products: the number of products that
belong to it directly, or 0 when it has none.
End your query with ORDER BY category_id.
Tables
| categories |
|---|
| category_id (PK) |
| category_name |
| products |
|---|
| product_id (PK) |
| product_name |
| category_id (FK) |