-
Need Query Help....
Hi....
i need the query to select the nth maximum value without using the "limit" in mysql 5
Thanks
S.Ashokkumar
-
nth maximum value without using the "limit" in mysql 5
try this following query where n-1 is you'r nthHighest value
SELECT max( a.id )
FROM test1 AS a
WHERE (n-1)<= (
SELECT count( DISTINCT (
b.id
) )
FROM test1 AS b
WHERE a.id < b.id )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|