Results 1 to 2 of 2

Thread: SQL problem

  1. #1
    Join Date
    Oct 2003
    Posts
    4

    Post Unanswered: SQL problem

    I've to find the 3rd highest value in the column. the datatype is numerical. Can you please suggest a SQL for me?

    Thanks!

  2. #2
    Join Date
    Mar 2004
    Posts
    448
    with temp(id,rows)
    as
    (select id,row_number() over(order by id)
    from <table_name>)
    select temp.* from temp where temp.rows =3

    works for unix/window db2 and for integer column

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •