programming-examples/sql/JoinHRDatabase/3. Write a query in SQL to display the first name, last name, salary, and job grade for all employees.sql

5 lines
272 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*3. Write a query in SQL to display the first name, last name, salary, and job grade for all employees. */
SELECT E.first_name, E.last_name, E.salary, J.grade_level
FROM employees E
JOIN job_grades J
ON E.salary BETWEEN J.lowest_sal AND J.highest_sal;