[ํ๋ก๊ทธ๋๋จธ์ค] ๋์ฌ ํ์๊ฐ ๋ง์ ์๋์ฐจ๋ค์ ์๋ณ ๋์ฌ ํ์ ๊ตฌํ๊ธฐ | ์ค๋ผํด
ยท
๐ Coding Test/SQL
๋ฌธ์ ๋์ฌ ํ์๊ฐ ๋ง์ ์๋์ฐจ๋ค์ ์๋ณ ๋์ฌ ํ์ ๊ตฌํ๊ธฐํ์ดSELECT TO_NUMBER(TO_CHAR(START_DATE, 'MM')) MONTH, CAR_ID, COUNT(*) RECORDSFROM CAR_RENTAL_COMPANY_RENTAL_HISTORYWHERE CAR_ID IN ( SELECT CAR_ID FROM CAR_RENTAL_COMPANY_RENTAL_HISTORY WHERE TO_CHAR(START_DATE, 'YYYYMM') >= '202208' AND TO_CHAR(START_DATE, 'YYYYMM') = 5 ) AND TO_CHAR(START_DATE, 'YYYYMM') >= '202208' AND TO_CHAR(START_DATE, 'YYYYMM') ..