Loading…
For each category, we want category_id, category_name, and a computed column showing how many belong to that category. Use a subquery in the clause to count for each category. Order the results by .
productsSELECTproductscategory_idCreate a free account to save your progress and reveal the worked answer for this free exercise. The complete practice library is available with Practice Pass or Mastery.