문제 링크

요약

  • Aggregation 으로도 ORDER BY 가 된다.

최종

  • Aggregation 으로도 ORDER BY 가 된다.
SELECT i.ingredient_type, SUM(f.total_order) AS total_order
FROM first_half f, icecream_info i
WHERE f.flavor = i.flavor
GROUP BY i.ingredient_type
ORDER BY SUM(f.total_order) ASC;