Posted by Ewoud Dronkert on 02/13/06 02:28
Mick wrote:
> Is there any way of doing this from a single SQL statement, perhaps
> using some sort of JOIN?
Yes. Why don't you ask in comp.databases.mysql, though? It's new!
select group_name, count(sms_people.member_id) as group_count
from sms_groups inner join sms_people_groups using group_id
inner join sms_people using member_id
group by group_name
--
E. Dronkert
[Back to original message]
|