# SUM(), MONTH(), JOIN&ON절 사용
SELECT CATEGORY, SUM(SALES) AS TOTAL_SALES
FROM BOOK_SALES JOIN BOOK ON BOOK_SALES.BOOK_ID = BOOK.BOOK_ID
WHERE MONTH(SALES_DATE) = 1
GROUP BY CATEGORY
ORDER BY CATEGORY
# SUM(), MONTH() 사용
SELECT CATEGORY, SUM(SALES) AS TOTAL_SALES
FROM BOOK_SALES, BOOK
WHERE BOOK_SALES.BOOK_ID=BOOK.BOOK_ID AND MONTH(SALES_DATE) = 1
GROUP BY CATEGORY
ORDER BY CATEGORY