Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following relations: Employee ( empno , ename, age, job, sal, deptno ) Dept ( depno , dname, loc ) The query is to
Consider the following relations:
Employeeempno ename, age, job, sal, deptno
Deptdepno dname, loc
The query is to display department details which have average salary greater than the average salary of dept are:
select emp.deptno, dname, loc from emp, dept
where dept.deptnoemp.deptno
group by emp.deptno dname, loc having avgsalselect avgsal from emp where emp.deptno;
select emp.deptno, dname, loc from emp, dept group by emp.deptno,dname, loc having dept.deptnoemp.deptno and avgsalselect avgsal from emp where emp.deptno;
select emp.deptno, dname, loc from emp join dept on dept.deptnoemp.deptno group by emp.deptno,dname, loc having avgsalselect avgsal from emp where emp.deptno;
IV
select deptno, dname, loc from dept where deptno in select deptno from emp group by deptno having avgsalselect avgsal from emp where emp.deptno;
Which of the following are correct?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started