https://school.programmers.co.kr/learn/courses/30/lessons/59412
SELECT HOUR(DATETIME) AS HOUR, COUNT(DATETIME) AS COUNT
FROM ANIMAL_OUTS
GROUP BY HOUR(DATETIME)
HAVING HOUR >= 9 AND HOUR<=19
ORDER BY HOUR;
SELECT HOUR(DATETIME) AS HOUR, COUNT(DATETIME) AS COUNT
FROM ANIMAL_OUTS
WHERE HOUR(DATETIME) >= 9 AND HOUR(DATETIME)<=19
GROUP BY HOUR
ORDER BY HOUR;
'ALGORITHM' 카테고리의 다른 글
[MySQL] 프로그래머스 - 루시와 엘라 찾기(IN) (0) | 2023.02.08 |
---|---|
[JAVA] 백준 1922 - 네트워크 연결 (0) | 2023.02.07 |
[알고리즘] 최대 힙 삽입,삭제 JAVA 구현 (0) | 2023.02.01 |
[JAVA] 백준 1713번- 후보 추천하기 (0) | 2023.01.31 |
[JAVA] 백준 2003번- 수들의 합 (0) | 2023.01.31 |