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!

Query the max when there is a tie

829538Jan 7 2011 — edited Jan 8 2011
Suppose i have a table with columns custName, custID, price, and description. From that table I need to display all the orders that paid the most (max price) with custName, description, and to_char(price)


Order
custName description to_char(price)
A desa $14
B desb $14
C desc $21
D desd $65
E dese $21
F desf $78

When I do select max(to_char(price)) from Order. it doesn't show both the max values. What I want is:

A desa $14
B desb $14
C desc $21
E dese $21
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 5 2011
Added on Jan 7 2011
15 comments
1,899 views