Problem Statement : Write a query that prints a list of employee names (i.e.: the name attribute) for employees in Employee having a salary greater than per month who have been employees for less than months. Sort your result by ascending employee_id.
Input Employee table format is described as follows:
where employee_id is an employee's ID number, name is their name, months is the total number of months they've been working for the company, and salary is their monthly salary.
For this challenge, we must:
Use an Order By to get Sort your result.
Restrict the selected rows using the WHERE clause so that only records where Salary greater than $2000 and Months greater less than 10 are returned.
SELECT name FROM Employee
WHERE salary > 2000 AND months < 10
ORDER BY employee_id;
Hope you learn something !!!
If you have any questions let me know in the comment section.
anonymous | May 7, 2022, 7:38 p.m.
Well explained 👍