CBSE Class 12 Computer Science Question 82 of 91

Grouping Records, Joins in SQL — Question 17

Back to all questions
17
Question

Question 16

Display only the jobs with maximum salary greater than or equal to 3000.

Answer
SELECT Job 
FROM Empl 
GROUP BY Job HAVING MAX(Sal) >= 3000;
Output
+-----------+
| Job       |
+-----------+
| PRESIDENT |
| ANALYST   |
+-----------+