RE: surely an easy quick one

2001-09-14 Thread Colin Partridge
O.k, how about this query. SELECT DISTINCT name,count(1) AS numPeople FROM tester Where team ='support' GROUP BY team Its a bit dirty and it returns an extra column, but this could be ignored -- Colin - Before posting,

RE: surely an easy quick one

2001-09-14 Thread Colin Partridge
Please ignore my last post. I had lost track of what you were trying to achieve with your query. -- Colin - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/

RE: surely an easy quick one

2001-09-14 Thread Colin Partridge
>> > this doesnt work as i need either :o( > > it returns 3 rows, each with a count of 3 inside. i just want to get a > *single row* with the number 3 in it (for my example). > > You just need to add another clause to the where statement > > SELECT COUNT(*) FROM table WHERE team = "support" AN

RE: surely an easy quick one

2001-09-14 Thread Colin Partridge
> > select count(*) from table where team='support' group by team > > I think that should be a group by name not by team. -- Colin - Before posting, please check: http://www.mysql.com/manual.php (the manual) http: