consider a table which contain 4 columns,ename,eno,sal and
deptno, from this table i want to know ename who having
maximum salary in deptno 10 and 20.
Answer Posted / ashim
select * from (select id,dept,sal,dense_rank() over
(partition by dept order by sal desc) p from a_tab1)
where p=1
....by using this program we can find out the nth salary of
different department jus give p=n
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to rename a column in the output of sql query?
how to show all tables with 'mysql'? : Sql dba
How to write html code in pl sql?
what are the 'mysql' command line arguments? : Sql dba
What is right join sql?
What are the advantages of sql? Explain
Why is partition used in sql?
What is sorting in sql?
What is parallel hint?
Explain the rollback statement?
Which command is used to delete a trigger?
how can you see all indexes defined for a table? : Sql dba
Is oracle sql free?
Which is faster union or join?
How do you add a column to a table?