-
level 2. 입양 시각 구하기(1)SQL/SQL 연습문제 풀이 2022. 1. 16. 22:10반응형
https://programmers.co.kr/learn/courses/30/lessons/59412
-- MySQL SELECT hour(DATETIME) AS HOUR, count(*) AS COUNT FROM ANIMAL_OUTS GROUP BY HOUR HAVING HOUR BETWEEN 9 AND 19 ORDER BY HOUR
-- Oracle SELECT HOUR, COUNT(*) AS COUNT FROM ( SELECT TO_CHAR(datetime, 'HH24') AS HOUR FROM ANIMAL_OUTS ) WHERE HOUR BETWEEN 9 AND 19 GROUP BY HOUR ORDER BY HOUR
반응형