Problem Solving
[MySQL] Employee Salaries
luminous13
2022. 3. 29. 13:54
문제
- 월급(salary)이 $2000을 초과하고(and) 회사에 다닌 지 10개월(month) 미만인 직원의 이름 리스트를 조회하세요.
- 조회 결과는 id(employee_id)를 기준으로 오름차순으로 정렬(order)합니다.
풀이
select name
from employee
where salary > 2000
and months < 10
order by employee_id;
Employee Salaries | HackerRank
Print the names of employees who earn more than $2000 per month and have worked at the company for less than 10 months.
www.hackerrank.com