728x90

문제

https://www.hackerrank.com/challenges/salary-of-employees/problem?isFullScreen=true

 

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

 

 

 

 

 

 

 


풀이(MSSQL)

SELECT NAME
  FROM EMPLOYEE
 WHERE SALARY > 2000
   AND MONTHS < 10
 ORDER BY EMPLOYEE_ID

 

조건 1. 샐러리가 2000 초과

조건 2. 일한 달 10달 미만

조건 3. 조회 순서는 ID로. 이름만 조회

300x250