Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to select records based on Max/Min on different columns and group by

965166Sep 28 2012 — edited Sep 28 2012
I have a table with 5 columns(a,b,c,d,e), i need to select records based on MAX(c),Max(D) and Min(e) group by a,b. i am trying using : select max(c),max(d),min(e) from table group by a,b. this is not working. its giving me 1 6 1

a b c d e
1 1 1 2 1
1 1 1 6 4
1 1 1 6 3

when i group by a,b i am expecting the record 1 6 3

Please help me with this.. Thanks in advance....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2012
Added on Sep 28 2012
5 comments
414 views