CBSE Class 12 Informatics Practices Question 19 of 79

Database Query using SQL — Question 11

Back to all questions
11
Question

Question 11

How can we display all the employees grouped together on the basis of deptno and sal in descending order?

Answer
SELECT ename, deptno, sal 
FROM emp
GROUP BY deptno 
ORDER BY Sal DESC;