코딩테스트 연습 > GROUP BY > 진료과별 총 예약 횟수 출력하기
https://school.programmers.co.kr/learn/courses/30/lessons/132202

SELECT mcdp_cd as "진료과코드", count(mcdp_cd) as "5월예약건수"
from appointment
where year(apnt_ymd) = '2022' and Month(apnt_ymd) = "05"
group by mcdp_cd
order by count(mcdp_cd) asc, mcdp_cd asc
year, month 를 통해 년, 월을 구분할 수 있다.