Hi, Can anybody please explain me the flow of the below query. I am not able to understand how this query works. This query is for finding the Nth highest salary.. SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHERE a.sal<=b.sal); If N = 2 then second highest salary will be the o/p. If N = 3 then third highest salary will be the o/p. and so on.. Thanks, Nitin
5 13556Post New Ness Technologies SQL PLSQL Interview Questions
Which is not a php magic constant?
What is the advantage of spring mvc?
What is the difference between merge and update method?
How to restart a wpf application programmatically?
how many sql ddl commands are supported by 'mysql'? : Sql dba
how can service sitting be setted for MCCB?Example for sittings IR (CURRENT RATING),IS(CURRENT STARTING)IO (current operating)?
Why doesnt the call scanf work?
What are the restrictions that views have to follow? : SQL Server Architecture
What do you mean by blocks in the blockchain technology?
What will happen if the user don’t have 'Read' security on a field?
What are the causes of damage to propellers?
What is dual data format in qlikview?
What is the concatenation operator?
7. Give me an example of a time when you have tried to accomplish something, and failed
Can we join more than 2 tables in sql?