SELECT A.APNT_NO APNT_NO, P.PT_NAME, A.PT_NO, D.MCDP_CD MCDP_CD, D.DR_NAME DR_NAME, A.APNT_YMD
-- 테이블 3개 한 번에 조인
FROM APPOINTMENT A
JOIN PATIENT P ON A.PT_NO = P.PT_NO
JOIN DOCTOR D ON A.MDDR_ID = D.DR_ID
WHERE A.APNT_YMD LIKE '2022-04-13%' AND A.APNT_CNCL_YN != 'Y' AND D.MCDP_CD = 'CS'
ORDER BY APNT_YMD