https://programmers.co.kr/learn/courses/30/lessons/59412
코딩테스트 연습 - 입양 시각 구하기(1)
ANIMAL_OUTS 테이블은 동물 보호소에서 입양 보낸 동물의 정보를 담은 테이블입니다. ANIMAL_OUTS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, NAME, SEX_UPON_OUTCOME는 각각 동물의 아이디, 생물
programmers.co.kr
1
2
3
4
5
|
select to_char(datetime, 'hh24'), count(datetime) count
from animal_outs
where to_char(datetime, 'hh24') between 9 and 20
group by to_char(datetime, 'hh24')
order by to_char(datetime, 'hh24')
|
'DB(Oracle) > Programmers(Oracle)' 카테고리의 다른 글
동명 동물 수 찾기_GROUP BY (0) | 2020.06.01 |
---|---|
고양이와 개는 몇 마리 있을까_GROUP BY (0) | 2020.06.01 |
NULL 처리하기_IS NULL (0) | 2020.05.31 |
이름이 있는 동물의 아이디_IS NULL (0) | 2020.05.31 |
이름이 없는 동물의 아이디_IS NULL (0) | 2020.05.31 |