Please start any new threads on our new
site at http://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Our new SQL Server Forums are live!
Come on over! We've restricted the ability to create new threads on these forums.
Flowing Fount of Yak Knowledge
quote:Originally posted by sodeepPlease show us what you have tried. What Salary do you consider as maximum?
Very Important crosS Applying yaK Herder
quote:Originally posted by add7quote:Originally posted by sodeepPlease show us what you have tried. What Salary do you consider as maximum?I tried by using MAX and joining the two tables. but that gives only one name and not all the names having the salary=max salary.
SELECT TOP 1 WITH TIES *
ORDER BY Salary DESC
SELECT DENSE_RANK() OVER (ORDER BY Salary DESC) AS Rnk,*