Skip to content

Instantly share code, notes, and snippets.

@Justus-coded
Created September 30, 2020 14:33
Show Gist options
  • Save Justus-coded/844386061f26dded28de35d6e9d82ceb to your computer and use it in GitHub Desktop.
Save Justus-coded/844386061f26dded28de35d6e9d82ceb to your computer and use it in GitHub Desktop.
Hackerrank SQL Challenge
/*
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 months.
Sort your result by ascending employee_id.
*/
SELECT name
FROM Employee
WHERE (salary > 2000) AND (months< 10)
ORDER BY employee_id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment