SQL 고득점 Kit - GROUP BY Level2 - 입양 시각 구하기(1) - mysql

Purple·2022년 10월 27일
0

sql

목록 보기
21/22

https://school.programmers.co.kr/learn/challenges?page=1&languages=mysql&order=recent

select hour(datetime), count(*) as count
from animal_outs
where date_format(datetime, '%H-%i') >= '09-00' and date_format(datetime, '%H-%i') <= '19-59'
group by hour(datetime)
order by hour(datetime) asc

date_fromat(datetime, '%H-%i')

  • hour, min
profile
안녕하세요.

0개의 댓글