Question: Consider the following relation: Eimployee ( empno , ename, age, job, sel, deptno ) Dept ( depno , dname, loc ) The query is to

Consider the following relation:
Eimployee(empno, ename, age, job, sel, deptno)
Dept(depno, dname, loc)
The query is to display department details which have average salary greater than the average salary of dept 30 are:
i.
select emp.deptno, dnqgere, loc from emp, dept where dept.deptno = emp.deptno
group by emp.deptno,dname, loc
having avg(sai)>(select avg(sal) from emp where emp.deptno =30):
select emp.deptno, dname, loc from emp, dept group by emp.deptno,dname, loc having dept.deptno=emp.deptno and avg(sal)>(select avg(sal) from emp where emp.deptno=30);
select emp.deptno, dname, loc from emp join dept on dept.deptno=emp.deptno group by emp.deptno,dname, loc having avg(sal)>(select avg(sal) from emp where emp.deptno=30);
IV.
select deptno, dname, loc from dept where deptno in (select deptno from emp group by deptno having avg(sal)>(select avg(sal) from emp where emp.deptno=30);
Which of the following are correct?
 Consider the following relation: Eimployee(empno, ename, age, job, sel, deptno) Dept(depno,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!