Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


There is a table with emp salary column how to get the fields belongs to the salary greater than the average salary of particular department.
Write a query

Answers were Sorted based on User's Feedback



There is a table with emp salary column how to get the fields belongs to the salary greater than the..

Answer / ram

SELECT * FROM emp e WHERE sal > (SELECT AVG(sal) FROM emp m
WHERE e.deptno = m.deptno GROUP BY deptno) ORDER BY deptno

gives u salary greater than the average salary of their
departments...

Is This Answer Correct ?    22 Yes 4 No

There is a table with emp salary column how to get the fields belongs to the salary greater than the..

Answer / murali krishna udayagiri

SELECT E.* FROM EMP E ,(SELECT DEPTNO,AVG(SAL) AVGSAL FROM
EMP GROUP BY DEPTNO) E1
WHERE E.SAL>E1.AVGSAL
AND E.DENPTNO=E1.DEPTNO;

Thanks,
Murali Udayagiri

Is This Answer Correct ?    6 Yes 2 No

There is a table with emp salary column how to get the fields belongs to the salary greater than the..

Answer / manoj

SELECT *FROM EMP WHERE SAL>(SELECT AVG(SAL) FROM EMP WHERE
DEPTNO=10);
this is correct answer. all the above answer are wrong except last one. Because in single row sub query we can't use group by clause. In all above queries they were used '>' simbol. So this is single row sub query matching operator.

Is This Answer Correct ?    3 Yes 0 No

There is a table with emp salary column how to get the fields belongs to the salary greater than the..

Answer / sameer

Select * from emplyees
Where sal>(select avg ( sal) from emplyees )
No need to write complex queries

Is This Answer Correct ?    2 Yes 1 No

There is a table with emp salary column how to get the fields belongs to the salary greater than the..

Answer / vivek singh

SELECT * FROM EMP WHERE SAL>(SELECT AVG(SAL) FROM EMP)
AND DEPTNO=10;

O/P:
7839 KING PRESIDENT 17-NOV-81 5000 10
7782 CLARK MANAGER 7839 09-JUN-81 2450 10

Is This Answer Correct ?    0 Yes 0 No

There is a table with emp salary column how to get the fields belongs to the salary greater than the..

Answer / lokesh y g

select e.no,e.name,e.salary from emp e where salary >
(select avg(salary)as salary from emp e1 where e.no=e1.no
group by no)

Is This Answer Correct ?    1 Yes 3 No

There is a table with emp salary column how to get the fields belongs to the salary greater than the..

Answer / sri

SELECT *FROM EMP WHERE SAL>(SELECT AVG(SAL) FROM EMP WHERE
DEPTNO=10);

Is This Answer Correct ?    4 Yes 6 No

Post New Answer

More Informatica Interview Questions

what is the difference between informatica6.1 and infomatica7.1

0 Answers   TCS,


In aggregator transformation, I sort the data before aggregator and select sorted port but still I’m getting an error. What is that error?

2 Answers  


how do u move the code from development to production?

3 Answers  


How will restrict values in 0-9 and A-Z and a-z and special character.Only allowed these chars otherwise we will reject the records? what is the function we used to restrict...

3 Answers   Cap Gemini,


what is sql override?what is the use of it?

4 Answers   Sonata,


In a table there are 1 million records there in which 3 records are duplicate how will you find out those 3 records?

6 Answers  


what is metadata?

6 Answers  


hi all, can anyone please tell me the difference between erwin tool and informatica ?how these both works ? how this both are going to connect with business objects. THANKS IN ADVANCE

2 Answers  


Dimension Object created in Oracle can be imported in Designer Cubes contain measures

0 Answers  


How the informatica server increases the session performance through partitioning the source?

1 Answers  


The Source coloumns are A,B,C with data row1- 10,20,30 row2- 40,50,60 row3-70,80,90 and so on. In the target I want one coloumn with the following data, Coloumn-X, row1-10,row2- 20,row3-30,row4-40,row5-50 and so on. How to achieve this?

3 Answers   Cap Gemini,


In which situation we will use persistant cache and shared cache in real time. plzsss answer with example

1 Answers   Wipro,


Categories