| Subject: | query for nth max | |
| Date: | 2007-08-25 02:05:46 | |
| From: | kashif094 | |
|
Response to: how do we find nth highest in SQL
|
||
|
select * from emp e where 1=(select count(distinct sal) from emp where e.sal<=sal)
|
||
Showing messages 1 through 1 of 1.
| Subject: | query for nth max | |
| Date: | 2007-08-25 02:05:46 | |
| From: | kashif094 | |
|
Response to: how do we find nth highest in SQL
|
||
|
select * from emp e where 1=(select count(distinct sal) from emp where e.sal<=sal)
|
||
Showing messages 1 through 1 of 1.