how to find nth highest salary
Answer Posted / mohd javed
BY Tested in Postgres SQL : javedcc@gmail.com
select * from tablename as aliasname where (nth)= (select
count(sal) from tablename where aliasname.sal<=sal)
| Is This Answer Correct ? | 8 Yes | 16 No |
Post New Answer View All Answers
What is user-defined inline table-valued function?
Where are SQL server users names and passwords are stored in sql server?
What is a transactions?
What is the default fill factor value?
If user is owning any SQL Objects, can we drop that user
Why is there a performance difference between two similar queries where one uses union and the other uses union all?
According to you what goes into making the best database administrator? : sql server database administration
Can we write trigger for view?
what is denormalization? : Sql server database administration
How can change procedure in sql server?
List layers of abstraction microsoft architectured to provide relational db through cloud platform ?
Does index speed up select statements?
Tell me what is the order in which the sql query is executed?
how we use window authentication connection with sql server.?
What is for xml in sql server?