Returns the month.
Syntax
MONTH(date)Example
Enter values below to update the example in real time.
order_date→total_amount→revenue→orders→-- 월별 매출 집계
SELECT MONTH(order_date) AS month, SUM(total_amount) AS revenue
FROM orders
WHERE YEAR(order_date) = 2024
GROUP BY month;