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

Give some information on report bursting and how to do it in bca as I have to split the report and send different reports to different people?

0 Answers  


how to join two flat files in informatica?

3 Answers   Wipro,


What are the different options available for update strategy?

0 Answers  


how can i invoke pmcmd in command line prompt

1 Answers  


Why filter transformation is an active one?

0 Answers  


I have a scenario like - how can i load 1st record to Trgt1,2nd->Trgt2, 3rd->Trgt3 and again the cycle has to repeat with loading 4th->Trgt1,5th->Trgt2,6th->Trgt3?

3 Answers   ITC Infotech, TCS,


In pmcmd command we need to type -p:password. Will it be visible to others who is having access to this file ?

4 Answers   Puma,


While using update strategy in the mapping which gives more performance, a flat file or Table? Why? What are the advantages and disadvantages?

4 Answers  


which transformation uses cache?

3 Answers   Keane India Ltd,


What type of sorting algorithm does the Sorter Transformation use, to do its sorting Operation? 1. Bubble sort 2. Insertion sort 3. Shell sort 4. Merge sort 5. Heapsort 6. Quicksort 7. Bucket sort

1 Answers   Qwest,


what is mean by grouping of condition column in lookup transformation?

1 Answers  


can you use flat file for repository?why?

2 Answers   TCS,


Categories