Returns the day of the week as a number (1=Sunday, 7=Saturday).
Syntax
DAYOFWEEK(date)Example
Enter values below to update the example in real time.
order_date→dow→cnt→orders→-- 요일별 주문 건수 (1=일, 7=토)
SELECT DAYOFWEEK(order_date) AS dow, COUNT(*) AS cnt
FROM orders
GROUP BY dow;