You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6 lines
349 B
MySQL

/*14. Write a query in SQL to display job title, full name (first and last name ) of employee, and the difference between
maximum salary for the job and salary of the employee.*/
SELECT job_title, first_name || ' ' || last_name AS Employee_name,
max_salary-salary AS salary_difference
FROM employees
NATURAL JOIN jobs;