프로그래밍 언어/SQL
-
[Programmers, Lv2] 자동차 종류 별 특정 옵션이 포함된 자동차 수 구하기프로그래밍 언어/SQL 2024. 6. 25. 23:50
문제문제1 : 코딩테스트 연습 - 자동차 종류 별 특정 옵션이 포함된 자동차 수 구하기 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr car_rental_company_car 테이블에 다음 문구 중 1개라도 들어가 있어야 한다.통풍시트열선시트가죽시트자동차 종류를 기준으로 오름차순 정렬문제 접근 해당 문제를 접근하는 방법으로 3가지 계획을 세웠다options 컬럼을 STRING_SPLIT을 사용하여 ','을 기준으로 분할하고, IN을 사용하여 해당 내용 중에 '통풍시트', '열선시트', '가죽시트'가 들어있는지 확인WHERE절에서 LIKE를 활용하여, '%통..