Multiple choice

Select a query to display the department number and maximum for those departments whose maximum salary is greater than 2900.

Consider the following relation schema ..... EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE)...

  1. select max(SAL), DEPTNO from EMP group by DEPTNO having max(SAL)>2600;

  2. select max(SAL), DEPTNO from EMP group by DEPTNO having max(SAL)>2900;

  3. select max(SAL), DEPTNO from EMP group by DEPTNO have max(SAL)>2900;

  4. options 1 and 2

  5. none of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

It will fetch the correct data