HackerRank MySQL - Employee Salaries




Write a query that prints a list of employee names (i.e.: the name attribute) for employees in Employee having a salary greater than $2000 per month who have been employees for less than 10 months. Sort your result by ascending employee_id.



  1. /*
  2. Enter your query here and follow these instructions:
  3. 1. Please append a semicolon ";" at the end of the query and enter your query in a single line to avoid error.
  4. 2. The AS keyword causes errors, so follow this convention: "Select t.Field From table1 t" instead of "select t.Field From table1 AS t"
  5. 3. Type your code immediately after comment. Don't leave any blank line.
  6. */
  7. SELECT NAME
  8. FROM EMPLOYEE
  9. WHERE SALARY > 2000
  10. AND MONTHS < 10
  11. ORDER BY EMPLOYEE_ID;




codesadda.com

Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube