12 lines
452 B
MySQL
12 lines
452 B
MySQL
|
/*Write a query to display the employee number, name( first name and last name ) and job title for all employees whose salary is
|
||
|
smaller than any salary of those employees whose job title is MK_MAN. Exclude Job title MK_MAN.
|
||
|
|
||
|
*/
|
||
|
|
||
|
SELECT employee_id,first_name,last_name, job_id
|
||
|
FROM employees
|
||
|
WHERE salary < ANY
|
||
|
( SELECT salary
|
||
|
FROM employees
|
||
|
WHERE job_id = 'MK_MAN' )
|
||
|
AND job_id <> 'MK_MAN' ;
|