Write a postgre sql subquery to find the first_name, last_name, job_id and salary of the employees who draws a salary that is higher than the salary of all the Shipping Clerk (JOB_ID = 'SH_CLERK')
Write a postgre sql subquery to find the first_name, last_name, job_id and salary of the employees who draws a salary that is higher than the salary of all the Shipping Clerk (JOB_ID = 'SH_CLERK'). Sort the results on salary from the lowest to highest
SELECT first_name,last_name, job_id, salary
FROM employees
WHERE salary >
ALL (SELECT salary
FROM employees
WHERE job_id = 'SH_CLERK')
ORDER BY salary ;
Sample table: employees
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer