SQL - How to select a row having a column with max value

Posted by Abhi on Stack Overflow See other posts from Stack Overflow or by Abhi
Published on 2010-05-18T02:40:38Z Indexed on 2010/05/18 2:50 UTC
Read the original article Hit count: 277

Filed under:
|
date                 value

18/5/2010, 1 pm        40
18/5/2010, 2 pm        20
18/5/2010, 3 pm        60
18/5/2010, 4 pm        30
18/5/2010, 5 pm        60
18/5/2010, 6 pm        25 

i need to query for the row having max(value)(i.e. 60). So, here we get two rows. From that, I need the row with the lowest time stamp for that day(i.e 18/5/2010, 3 pm -> 60)

© Stack Overflow or respective owner

Related posts about sql

Related posts about Oracle