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

Define error Threshold?

1 Answers  


what are factless facts? And in which scenario will you use such kinds of fact tables.

0 Answers  


How to load the name of the current processing flat file along with the data into the target using informatica mapping?

0 Answers   Informatica,


scenario: dept_no emp_nem 10 A, 10 B, 10 C, 10 D, 20 P, 20 Q, 20 R, 20 S output: dept_no emp_nem 10 A, 10 AB, 10 ABC, 10 ABCD, 20 ABCDP, 20 ABCDPQ, 20 ABCDPQR, 20 ABCDPQRS

1 Answers  


how do u fnd the duplicate rows and how to delete the duplicate rows?

2 Answers   IBM,






Hi frndz, "while i am going to run the infotmatica power designer,he ask the id and password ",then i enterd the id and passwd , at that time i got the error as " failed to connect repository " ?

3 Answers  


version controlling in informatica?

3 Answers  


Explain one complecated mapping?

3 Answers   Fidelity, Wipro,


Diff B/W MAP Parameter, SESSION Paramater, DataBase connection session parameters.? Its possible to Create 3parameters at a time? If Possible which one will fire FIRST?

6 Answers   Accenture, HCL,


Work flow failed when it is set to Bulk mode but it was successful when set to normal mode y??(All the connections are fine and exactly correct)?

11 Answers   Wipro,


Useful UNIX commands regular/frequently used

1 Answers   Deloitte,


If u r using dynamic cache lookup port will be thier in thet which option u will select

1 Answers   HCL,


Categories