select g.GROUP_NAME, count(mg.MEM_ID) as NUMBER_OF_MEMBERS from GROUPS g left join MEM_GRO mg using(GRO_ID) group by g.GRO_ID

John Meyer wrote:
I have two tables:


MEMBERS:
MEM_ID
...

GROUPS:
GRO_ID:
...

And one joiner

MEM_GRO:
MEM_ID, GRO_ID


I want to print out a list like this

GROUP_NAME, NUMBER_OF_MEMBERS

Even when the number of members is 0, how do I do that?




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to