Re: Group by function and avg on char

2008-03-29 Thread Peter Brawley
Phil, If in the 2nd query you want teams with the highest count per cpid found in the first query, I think you can map the 'Avoiding repeat aggregation' pattern (http://www.artfulsoftware.com/infotree/queries.php) to your problem PB - Phil wrote: Hi all, got a simple problem I'm

Group by function and avg on char

2008-03-27 Thread Phil
Hi all, got a simple problem I'm trying to solve without success. Given the following table CREATE TABLE `scores` ( `proj` char(3) NOT NULL default '', `id` int(11) NOT NULL default '0', `score` double default NULL, `cpid` char(32) default NULL, `team` char(20) default NULL, PRIMARY