Results 1 to 2 of 2

Thread: Need Query Help....

  1. #1
    Join Date
    Jul 2006
    Posts
    19

    Need Query Help....

    Hi....

    i need the query to select the nth maximum value without using the "limit" in mysql 5

    Thanks
    S.Ashokkumar

  2. #2
    Join Date
    Dec 2006
    Location
    Mumbai
    Posts
    4

    Thumbs up 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
  •