Database Management
Accenture Technical PrimermediumDatabase Management07 Joins & Subquery

To display the names of employees who earns more than the average salary of all employees. SELECT last_name, first_name FROMemployee WHEREsalary > AVG(salary); Which change should you make to achieve the desired results?

Answer options

A
Move the function to the SELECT clause and add a GROUP BY clause and a HAVING claus
B
Use a subquery in the WHERE clause to compare the average salary valu
C
Move the function to the SELECT clause and add a GROUP BY claus

Correct answer: Use a subquery in the WHERE clause to compare the average salary valu

Explanation

Quick AnswerThe correct answer is Use a subquery in the WHERE clause to compare the average salary valu because it directly addresses the core logic of Database Management.

A correlated subquery in WHERE is needed to compare each salary to the average.

Related Accenture Database Management questions

Practice more Accenture Database Management questions

PrimerPrep has 1400+ practice questions, 2026 simulations and coding hands-on — all free.

Watch Walkthroughs!