SELECT LEFT(PRODUCT_CODE, 2) AS CATEGORY, COUNT(PRODUCT_CODE) AS PRODUCTS FROM PRODUCT GROUP BY LEFT(PRODUCT_CODE, 2) ORDER BY PRODUCT_CODE
programmers 카테고리 별 상품 개수 구하기 github