[SQL] 조건에 맞는 개발자 찾기

NoHae·2025년 2월 2일

SQL

목록 보기
32/86

문제 출처

코딩테스트 연습 > SELECT > 조건에 맞는 개발자 찾기
https://school.programmers.co.kr/learn/courses/30/lessons/276034

문제 설명

접근 방법

& (AND 비트 연산자) 에 대한 이해가 있어야하는 문제이다.

developers 테이블의 skill_code와 skillcodes의 해당하는 code를 가져와 & 연산을 진행한다.

select id, email, first_name, last_name
from developers
where skill_code & (select code from skillcodes where name = "C#") or
skill_code & (select code from skillcodes where name = "Python")
order by id asc

알게된 점

where 절에서 비트 연산도 가능하다.

문제푼 흔적

profile
노력 해보려고 하는 사람(00년생 소프트웨어융합학과, 24년 12월 부터 백엔드 및 코테 공부 시작)

0개의 댓글