코딩 테스트 연습/[프로그래머스][리트코드] MySQL

577. Employee Bonus

duswjd_data 2025. 8. 26. 09:17

문제

https://leetcode.com/problems/employee-bonus/description/


문제 설명

  • 보너스가 1000 미만이거나, 보너스 정보가 없는 직원의 name과 bonus를 조회

정답 코드

SELECT e.name, b.bonus
FROM employee e LEFT JOIN bonus b ON e.empId = b.empId
WHERE b.bonus < 1000 OR b.bonus IS NULL