Given the below employee table as input, choose the query that displays department wise average salaries sorted in descending order.

ID ENAME DEPT SALARY
1 James Potter FSI 75000
2 Ethan McCarty ETA 90000
3 Emily Rayner ETA 25000
4 Jack Abraham ETA 30000

SELECT AVG(Salary) AvgSal, Dept FROM Employee GROUP BY Dept ORDER BY 1
SELECT AVG(Salary) AvgSal, Dept FROM Employee ORDER BY AVG(Salary) GROUP BY Dept
SELECT AVG(Salary) AvgSal, Dept FROM Employee GROUP BY Dept ORDER BY AvgSal DESC
SELECT Dept, AVG(Salary) AvgSal FROM Employee GROUP BY 1 ORDER BY 2 DESC
Verified Answer
Correct Option - c

To get all Infosys Certified Bigdata Testing Professional Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram