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