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...


how to findout the 100th maximum salary

Answers were Sorted based on User's Feedback



how to findout the 100th maximum salary..

Answer / sajid siddiki

SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT
(DISTINCT (b.sal)) FROM EMP B WHERE a.sal < = b.sal);
For Eg:-
Enter value for n: 100
SAL
---------
3700

Is This Answer Correct ?    0 Yes 0 No

how to findout the 100th maximum salary..

Answer / g sivanagaraju

SELECT sal
FROM emp e
WHERE &100=(SELECT COUNT(DISTINCT(SAL))
FROM emp
WHERE e.sal<=sal);

Is This Answer Correct ?    0 Yes 0 No

how to findout the 100th maximum salary..

Answer / swastik

SELECT LEVEL, MAX(Sal)
FROM Emp
GROUP BY LEVEL
HAVING LEVEL = &GiveNo
CONNECT BY PRIOR Sal > Sal;

Is This Answer Correct ?    0 Yes 0 No

how to findout the 100th maximum salary..

Answer / ram

select * from emp
where sal in(select max(sal) from emp
where level=&nth
connect by prior sal>sal
group by level)order by sal

Is This Answer Correct ?    0 Yes 0 No

how to findout the 100th maximum salary..

Answer / siva prasad

SELECT B.* FROM
(SELECT A.*,DENSE_RANK() OVER(ORDER BY SAL DESC) V_SAL
FROM EMP A )B
WHERE V_SAL = 100

Is This Answer Correct ?    0 Yes 0 No

how to findout the 100th maximum salary..

Answer / parul verma

select min(salary) from (select distinct salary from emp
where salary is not null order by salary desc) where rownum
<=100;

Is This Answer Correct ?    0 Yes 1 No

how to findout the 100th maximum salary..

Answer / lince

select sal from
(
select row_number() over (order by sal desc) as rno,sal
from Emp
)T
where T.rno=100

Is This Answer Correct ?    0 Yes 2 No

how to findout the 100th maximum salary..

Answer / raghuvir

select min(sal) from empl where romwnum < = 100 order by
sal desc

Is This Answer Correct ?    1 Yes 4 No

how to findout the 100th maximum salary..

Answer / akki reddy

SELECT *
(SELECT SAL, ROWNUM RN FROM EMP ORDER BY SAL DESC)
WHERE RN=100;

Is This Answer Correct ?    0 Yes 3 No

how to findout the 100th maximum salary..

Answer / katasani rajesh reddy

select salary from(select salary from
order by salary)
where rownum<=100
minus
select salary from(select salary from
order by salary)
where rownum<=99

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL PLSQL Interview Questions

Can we rename a column in the output of sql query?

0 Answers  


what is difference b/w pravite procedures and public procedures?

3 Answers   Steria, Wipro, Zensar,


Can we debug stored procedure?

0 Answers  


Which type of cursor is used to execute the dml statement?

0 Answers  


What is difference between inner join and cross join?

0 Answers  


what is the different between now() and current_date()? : Sql dba

0 Answers  


What is compiled query?

0 Answers  


What are three advantages to using sql?

0 Answers  


Is merge a dml statement?

0 Answers  


Can you sum a count in sql?

0 Answers  


how to connect oracle in unix prompt?

4 Answers   Polaris,


Easy way to convert tableau "IF - ELSEIF" statements to Netezza "CASE" statements.

1 Answers   CTS,


Categories