You need to fetch the first names (in a reverse alphabetical order) of all the employees in the department ID = 100 and who have the maximum salary in the JOB ID = 'SA_REP'. Which of the following queries will give the required output? (Choose the most appropriate output) O SELECT E first_name, job_id, salary FROM employees E WHERE salary IN (SELECT max(salary) FROM employees E1 WHERE E1.department_id = 100 GROUP BY job_id) ORDER BY first_name o SELECT E.first_name, job_id, salary FROM employees E WHERE salary = (SELECT max(salary) FROM employees E1 WHERE E1.department_id = 100 GROUP BY job_id ) AND job_id = "SA_REP ORDER BY first_name O SELECT E first_name, job_id, salary FROM employees E WHERE salary IN (SELECT max(salary) FROM employees E1 where job_id = 'SA_REP GROUP BY job_id) AND WHERE E.department_id = 100 ORDER BY first_name desc: O SELECT E first_name, job_id, salary FROM employees E WHERE salary in (SELECT max(salary) FROM employees E1 where E1.department_id = 100) ORDER BY first_name,
You need to fetch the first names (in a reverse alphabetical order) of all the employees in the department ID = 100 and who have the maximum salary in the JOB ID = 'SA_REP'. Which of the following queries will give the required output? (Choose the most appropriate output) O SELECT E first_name, job_id, salary FROM employees E WHERE salary IN (SELECT max(salary) FROM employees E1 WHERE E1.department_id = 100 GROUP BY job_id) ORDER BY first_name o SELECT E.first_name, job_id, salary FROM employees E WHERE salary = (SELECT max(salary) FROM employees E1 WHERE E1.department_id = 100 GROUP BY job_id ) AND job_id = "SA_REP ORDER BY first_name O SELECT E first_name, job_id, salary FROM employees E WHERE salary IN (SELECT max(salary) FROM employees E1 where job_id = 'SA_REP GROUP BY job_id) AND WHERE E.department_id = 100 ORDER BY first_name desc: O SELECT E first_name, job_id, salary FROM employees E WHERE salary in (SELECT max(salary) FROM employees E1 where E1.department_id = 100) ORDER BY first_name,
Chapter11: Group Functions
Section: Chapter Questions
Problem 18MC
Related questions
Question
100%
![You need to fetch the first names (in a reverse alphabetical order) of all the employees in the department ID = 100 and who have the maximum salary in the JOB ID = 'SA_REP'. Which of the following queries will give the
required output? (Choose the most appropriate output)
O SELECT E.first_name, job_id, salary FROM employees E WHERE salary IN
(SELECT max(salary) FROM employees E1 WHERE E1.department_id = 100
GROUP BY job id ) ORDER BY first name
O SELECT E.first_name, job_id, salary FROM employees E WHERE salary =
(SELECT max(salary) FROM employees E1 WHERE E1.department_id = 100 GROUP BY job_id ) AND job_id = 'SA_REP' ORDER BY first_name;
O SELECT E.first_name, job_id , salary FROM employees E WHERE salary IN (SELECT max(salary) FROM employees E1 where job_id = 'SA_REP' GROUP BY job_id ) AND WHERE E.department_id = 100 ORDER BY first_name desc;
O SELECT E.first name, job id, salary FROM employees E WHERE salary in
(SELECT max(salary) FROM employees E1
where E1.department_id = 100) ORDER BY first_name;](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F26e457f3-1eff-4a30-84db-d392ecbd15ab%2F5fe7ec90-8335-4f4b-a42d-522dc2a5b784%2Fxnkp6u_processed.jpeg&w=3840&q=75)
Transcribed Image Text:You need to fetch the first names (in a reverse alphabetical order) of all the employees in the department ID = 100 and who have the maximum salary in the JOB ID = 'SA_REP'. Which of the following queries will give the
required output? (Choose the most appropriate output)
O SELECT E.first_name, job_id, salary FROM employees E WHERE salary IN
(SELECT max(salary) FROM employees E1 WHERE E1.department_id = 100
GROUP BY job id ) ORDER BY first name
O SELECT E.first_name, job_id, salary FROM employees E WHERE salary =
(SELECT max(salary) FROM employees E1 WHERE E1.department_id = 100 GROUP BY job_id ) AND job_id = 'SA_REP' ORDER BY first_name;
O SELECT E.first_name, job_id , salary FROM employees E WHERE salary IN (SELECT max(salary) FROM employees E1 where job_id = 'SA_REP' GROUP BY job_id ) AND WHERE E.department_id = 100 ORDER BY first_name desc;
O SELECT E.first name, job id, salary FROM employees E WHERE salary in
(SELECT max(salary) FROM employees E1
where E1.department_id = 100) ORDER BY first_name;
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
![A Guide to SQL](https://www.bartleby.com/isbn_cover_images/9781111527273/9781111527273_smallCoverImage.gif)
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
![Oracle 12c: SQL](https://www.bartleby.com/isbn_cover_images/9781305251038/9781305251038_smallCoverImage.gif)
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
![A Guide to SQL](https://www.bartleby.com/isbn_cover_images/9781111527273/9781111527273_smallCoverImage.gif)
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr