My programing World
A collection of programs and interview questions
Thursday, May 12, 2016
SQL : top 2 salary in each department
select * from (
select dept,sal,row_number() over(partition by dept order by sal desc) as dd from emp
) as t where t.dd < 2
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment