SELECT CAR_ID , CASE WHEN MAX('2022-10-16' BETWEEN START_DATE AND END_DATE) = 1 THEN '대여중' ELSE '대여 가능' END AS AVAILABILITY FROM CAR_RENTAL_COMPANY_RENTAL_HISTORY GROUP BY CAR_ID ORDER BY CAR_ID DESC; → 각 행에 대해 '2022-10-16' BETWEEN START_DATE AND END_DATE 이면 1을 반환, 그렇지 않으면 0을 반환 SELECT CAR_ID , CASE WHEN COUNT(CASE WHEN DATE('2022-10-16') BETWEEN START_D..