Hi,

I've just ported from SQLServer where this query ran fine, however MySQL
gives an "invalid use of group function" error.

Any ideas?

thx

dan

select us.username, us.id as userid,  count(*) as tips from UserTippingInfo
u, Matches m, Users us  WHERE round = 23 AND us.id = u.userid AND
m.matchnumber = u.matchnumber and played = 1 and u.tip = m.winner and
u.competitionid = 20 and datemade < dateplayed group by us.username, us.id
order by count(*) DESC,  MIN(datemade) LIMIT 10


UserTippingInfo u                               Matches m                              
 Users us
userid int                                      matchnumber int                 id int
competitionid into                      round tinyint                   username 
varchar(50)
matchnumber int                         played tinyint
datemade datetime                               winner varchar(25)
tip varchar(25)                         dateplayed datetime



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to