MySQL Forums
Forum List  »  Newbie

Using MAX() or MIN()
Posted by: cyrille
Date: June 18, 2005 03:00PM

Hello!
Suppose I have a table with two columns - mov_name and mov_popularity and I want to select the most popular movie(s).
I've tried the following:
SELECT * FROM table HAVING mov_popularity=MAX(mov_popularity)
but I got nothing in return.
I've done the same with MIN() instead of MAX() and got only one result.
Could you please tell me how to solve this?

Options: ReplyQuote


Subject
Written By
Posted
Using MAX() or MIN()
June 18, 2005 03:00PM
June 18, 2005 06:00PM
June 20, 2005 04:55AM
June 20, 2005 10:17AM
June 20, 2005 10:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.