MySQL Forums
Forum List  »  Newbie

Re: Using MAX() or MIN()
Posted by: cyrille
Date: June 20, 2005 04:55AM

Yeah, I also thought about this but imagine you have two movies of exactly the same popularity. This query
select * from table order by mov_popularity desc limit 1
will return only one of them whereas I would like both of them.

Maybe there is a way to compare the mov_popularity value for every movie with the maximum (minimum) value of the column and select the movie if the two values are the same?

Options: ReplyQuote


Subject
Written By
Posted
June 18, 2005 03:00PM
June 18, 2005 06:00PM
Re: Using MAX() or MIN()
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.