Algorithm/문제풀이1 [SQL] 프로그래머스 - 코딩테스트 연습 > GROUP BY > 입양 시각 구하기(1) -- 코드를 입력하세요 SELECT HOUR ,COUNT(HOUR) FROM ( SELECT TO_CHAR(DATETIME, 'FMHH24') AS HOUR FROM ANIMAL_OUTS WHERE 1=1 AND EXTRACT(HOUR FROM CAST(DATETIME AS TIMESTAMP)) > 8 AND EXTRACT(HOUR FROM CAST(DATETIME AS TIMESTAMP)) < 20 ) GROUP BY HOUR ORDER BY TO_NUMBER(HOUR); 2023. 8. 11. 이전 1 다음