ji-0630 / CodingTest

코딩테스트 연습 기록
0 stars 0 forks source link

진료과별 총 예약 횟수 출력하기 #207

Closed ji-0630 closed 1 year ago

ji-0630 commented 1 year ago

문제 설명

image

ji-0630 commented 1 year ago

나의 풀이

v=select MCDP_CD as "진료과 코드", count(*) as "5월예약건수"
from APPOINTMENT
where APNT_YMD like "2022-05-%" 
group by MCDP_CD
order by 5월예약건수, MCDP_CD
ji-0630 commented 1 year ago

다시 풀이


SELECT MCDP_CD as "진료과 코드", count(*) as "5월예약건수"
from APPOINTMENT
where APNT_YMD like "2022-05-%"
group by MCDP_CD
order by count(*), MCDP_CD