ji-0630 / CodingTest

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

취소되지 않은 진료 예약 조회하기 #245

Closed ji-0630 closed 1 year ago

ji-0630 commented 1 year ago

문제 설명

image image

ji-0630 commented 1 year ago

나의 풀이

SELECT a.APNT_NO, p.PT_NAME, p.PT_NO, d.MCDP_CD, d.DR_NAME, a.APNT_YMD
from PATIENT p inner join APPOINTMENT a
on p.PT_NO = a.PT_NO
inner join DOCTOR d
on d.DR_ID = a.MDDR_ID
where date_format(a.APNT_YMD, "%Y-%m-%d") = "2022-04-13"
and a.MCDP_CD = "CS"
and a.APNT_CNCL_YN = "N"
order by a.APNT_YMD