MySQL Forums
Forum List  »  German

Re: GROUP BY Problem
Posted by: Sebastian Gläßel
Date: December 04, 2008 02:40PM

Hallo,

schonmal mit

SELECT u.uid, MAX(s.Value) MaxValue FROM User u, Score s WHERE u.UserId = s.UserId AND u.uid IN (664829536, 623333856, 1602877274) AND s.Value > 5000 GROUP BY s.UserId;

also ohne MAX() in der WHERE Klausel versucht?
Könnte mir vorstellen das der MySQL Server, mit dem MAX() beim WHERE eine fehlerhafte GROUP Funktion anmeckert.

Evtl noch mit ORDER BY MAX(s.Value) DESC damit "Topvalue" auch oben steht.

Grüße Sebastian

Options: ReplyQuote


Subject
Views
Written By
Posted
3040
November 06, 2008 07:08AM
Re: GROUP BY Problem
2124
December 04, 2008 02:40PM


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.