자동차 종류 별 특정 옵션이 포함된 자동차 수 구하기

gov's avatar
Jan 02, 2025
자동차 종류 별 특정 옵션이 포함된 자동차 수 구하기
Contents
문제풀이

문제

notion image
notion image

풀이

  • where 컬럼명 like ‘%문자열%’ : 특정 문자열을 앞뒤로 포함할 때
SELECT car_type, count(car_type) as CARS from car_rental_company_car where options like '%통풍시트%' or options like '%열선시트%' or options like '%가죽시트%' group by car_type order by car_type;
Share article

goho