본문 바로가기

Coding Test/프로그래머스

[프로그래머스/MySQL] 입양 시각 구하기(1)

SELECT HOUR(DATETIME) AS HOUR, COUNT(*) AS 'COUNT'
    FROM ANIMAL_OUTS
    GROUP BY HOUR(DATETIME) HAVING HOUR >= 9 AND HOUR < 20
    ORDER BY HOUR;