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
A correlated subquery in WHERE is needed to compare each salary to the average.