How to find only %th Highest Sal
Answers were Sorted based on User's Feedback
Ans: select distinct(a.salary) from customers a where &n =
(select count(distinct(b.salary)) from customers b where
a.salary <= b.salary);
It will ask you to enter number in input box which salary
you want to see
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sujitpingale
Ans: select distinct(a.salary) from customers a where &n =
(select count(distinct(b.salary)) from customers b where
a.salary <= b.salary);
Enter value in inputbox. If you enter 1 then it will give
highest salary
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ajit
select e.*, rn
from ( select empno, ename, sal, deptno, dense_rank() over ( order by sal desc ) rn
from emp) e
where rn = & rn;
Is This Answer Correct ? | 2 Yes | 0 No |
SELECT A.FIRST_NAME,
A.SALARY
FROM EMPLOYEES A
WHERE 3 = ( SELECT COUNT(*) -- Replace 3 with any value of (N - 1)
FROM EMPLOYEES B
WHERE B.SALARY > A.SALARY)
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / pavan
select e.* from emp e where &n=(select count(distinct e1.sal)from emp e1 where e.sal>e1.sal)
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ajit
select *
from emp
where sal = ( select max(sal)
from emp
where level = &n
connect by prior sal > sal
group by level);
Is This Answer Correct ? | 0 Yes | 0 No |
what are the performance and scalability characteristics of mysql? : Sql dba
i have a table emp and columns ename,empno,mgr_id,i need ename,manager name as result i.e employee respective manager.. example empno ename mgr_id 1 john 3 2 paul 3 3 smith 1 4 kevin 1 5 stewart 2 result has to look like this ename manager john smith paul smith smith john kevin john stewart paul can u plz help me out in this.....
What is parallel hint?
Hi all, i have a table as follows empid empname mgrid deptid 1 a 3 4 2 b 1 5 3 c 2 3 4 d 3 6 5 e 4 7 i want the output as empname mgrname a c b a c b d c e d
can i call procedure in package
Can we create a trigger on view?
what is a cursor? : Sql dba
How can you load microsoft excel data into oracle? : aql loader
Can we insert data into view?
Can you sum a count in sql?
What are the types of index in sql?
Write the alter statement to enable all the triggers on the t.students table.