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 5000 EMP in company.how we find out the 5th
highest getting salary employee outof 5000 employes........

Answers were Sorted based on User's Feedback



There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 ..

Answer / nagireddy

select max(sal) from emp a where 5=(select count(distinct sal)
from emp b where a.sal<=b.sal);

Is This Answer Correct ?    13 Yes 3 No

There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 ..

Answer / kasyapa

select * from emp A where 4 = (select count(*) from emp B
where A.sal<B.sal)

Is This Answer Correct ?    6 Yes 2 No

There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 ..

Answer / satish kalynm

SELECT * FROM T999 WHERE SAL<(SELECT MAX(SAL) FROM T999
WHERE SAL<(SELECT MAX(SAL) FROM T999 WHERE SAL<(SELECT
MAX(SAL) FROM T999 WHERE SAL<(SELECT MAX(SAL) FROM T999))));

Is This Answer Correct ?    5 Yes 2 No

There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 ..

Answer / rajib

select max(salary) from staff where salary not in(select
salary from staff order by salary desc fetch first 4 rows
only)

Is This Answer Correct ?    3 Yes 0 No

There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 ..

Answer / payel

SELECT * FROM STAFF AA
WHERE 5 = (SELECT COUNT (SALARY) FROM STAFF WHERE SALARY
<= AA.SALARY );

Is This Answer Correct ?    3 Yes 1 No

There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 ..

Answer / ashok

in above answers what is a.sal and b.sal please explain me

Is This Answer Correct ?    0 Yes 0 No

There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 ..

Answer / abhusha

SELECT SAL FROM EMP A
WHERE 5 = (SELECT COUNT(*) FROM EMP B
WHERE B.SAL >= A.SAL)

Is This Answer Correct ?    0 Yes 0 No

There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 ..

Answer / sachin

SELECT MAX(SALARY) FROM EMP WHERE SALARY <
(SELECT MAX(SALARY) FROM EMP WHERE SALARY <
(SELECT MAX(SALARY) FROM EMP WHERE SALARY <
(SELECT MAX(SALARY) FROM EMP WHERE SALARY <
(SELECT MAX(SALARY) FROM EMP WHERE SALARY ))))

Is This Answer Correct ?    0 Yes 1 No

There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 ..

Answer / pavan

try this one....


select * from emp where emp_Id = (select emp_Id from emp
order by sal)
and count(*) < 6;

Is This Answer Correct ?    0 Yes 5 No

There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 ..

Answer / udhay

SELECT MAX(salary)
FROM employees
WHERE salary
NOT IN (SELECT TOP 4 salary FROM employees ORDER BY salary
DESC)

Is This Answer Correct ?    1 Yes 7 No

Post New Answer

More DB2 Interview Questions

Can DASD types assigned to storage groups be intermixed (i.e., 3350s and 3380s)?

1 Answers  


Generally if I want to select the names starting with c I need to use c% But how could I code to select the data which contains % as a part of data.

5 Answers  


Explain the EXPLAIN statement?

1 Answers  


Can we delete records from view?

0 Answers  


How to insert more than one record using insert?

7 Answers   Atos Origin, IBM,


What is REORG? When is it used?

4 Answers  


What is the difference between group by and order by?

2 Answers   IBM, TCS,


what is plan? is plan executable or package?

4 Answers  


When do you specify the isolation level? How?

1 Answers  


When a COBOL-DB2 program in PRODUCTION is updating main tables and gone for long run, what have to do?

0 Answers   Broadridge,


How could one combine a set of incremental image copies into a single copy?

1 Answers  


Define sqlca.

0 Answers  


Categories