Write a query to display Which deptno is containing highest
Sal > avg (sum (Sal)) of all deptno;


Avg (sum (Sal)) o f all deptno= 9675
Deptno, sum (Sal)
10 8750
20 10875
30 9400

Answers were Sorted based on User's Feedback



Write a query to display Which deptno is containing highest Sal > avg (sum (Sal)) of all deptn..

Answer / rakesh

select deptno, sum(sal) from emp group by deptno having sum(sal)>(select avg(sum(sal)) from emp group by deptno);

Is This Answer Correct ?    4 Yes 1 No

Write a query to display Which deptno is containing highest Sal > avg (sum (Sal)) of all deptn..

Answer / ravikishore

select deptno,sum(sal) from emp group by deptno having
sum(Sal) =(select max(sum(sal)) from emp group by deptno)

Is This Answer Correct ?    2 Yes 1 No

Write a query to display Which deptno is containing highest Sal > avg (sum (Sal)) of all deptn..

Answer / shankar

select * from emp a where sal>(select avg(sal) from emp b
where a.deptno=b.deptno)

Is This Answer Correct ?    1 Yes 0 No

Write a query to display Which deptno is containing highest Sal > avg (sum (Sal)) of all deptn..

Answer / moorthy g

select deptno, max(sal) from emp group by deptno
having max(sal)> (select avg(max(sal)) from emp group by
deptno);

Output:

DEPTNO MAX(SAL)
---------- ----------
10 5000

Is This Answer Correct ?    0 Yes 0 No

Write a query to display Which deptno is containing highest Sal > avg (sum (Sal)) of all deptn..

Answer / aashish

select department_ID, sum(salary) from emp group by department_ID having sum(salary) > (select avg(sum(salary)) from emp group by department_ID);

Is This Answer Correct ?    0 Yes 0 No

Write a query to display Which deptno is containing highest Sal > avg (sum (Sal)) of all deptn..

Answer / jz

select deptno,max(sal) from emp
group by deptno
having max(sal)>(select avg(sum(sal) )from emp
group by deptno)


:)

Is This Answer Correct ?    3 Yes 5 No

Write a query to display Which deptno is containing highest Sal > avg (sum (Sal)) of all deptn..

Answer / rakesh

select deptno, sum(sal) from emp group by deptno having sum(sal)>(select avg(sum(sal)) from emp

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More Informatica Interview Questions

why do we go for update strategy tr in SCD rather using the session properties?

3 Answers   IBM,


ename,deptcount vamshi,3 kumar,5 krish,8 in o/p i want vamshi record 3 times kumar record 5 times like wise what is the logic.? give the entire logic plz

1 Answers   IBM,


What is the format of informatica objects in a repository? What are the databases that informatica can connect to windows?

0 Answers  


how many types of dimensions are available in informatica?

0 Answers  


SOURECE Name id dept sal 1 a1 A 100 2 b1 B 200 3 c1 C 300 4 d1 D 400 TARGET: Name id dept sal 1 a1 A 100 2 b1 B 200 3 WER1 567 300 4 d1 D 400 I HAVE SOURCE AND TARGET. HOW TO VALIDATE DATA? TELL ME 5 STEPS ABOVE TABLE?

1 Answers   IBM,






Why you use repository connectivity?

3 Answers   Yash Technologies,


What is a poling?

2 Answers  


How can you define a transformation? What are different types of transformations in Informatica?

10 Answers  


SOURCE 1 a 1 b 1 c 2 a 2 b 2 c TARGET 1 A B C 2 A B C In oracle & informatica level how to achieve

4 Answers   iGate,


Clarify the utilization of aggregator cache record?

0 Answers  


What are the challenges you have faced in your Project (DWH- ETL)? Explain with example?

0 Answers   TCS,


what transformations are used for Variable port?

2 Answers  


Categories