Re: Doing a join

2006-08-02 Thread Martin Jespersen
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

RE: Doing a join

2006-08-02 Thread John Meyer
Yeah, I just figured it out ten minutes ago, one of those stupid little oversites on my part. -Original Message- From: Martin Jespersen [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 02, 2006 3:40 PM To: John Meyer Cc: mysql@lists.mysql.com Subject: Re: Doing a join select

Re: Doing a join

2006-08-02 Thread Jay Pipes
On Wed, 2006-08-02 at 11:13 -0600, 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

RE: Doing a join

2006-08-02 Thread John Meyer
Subject: Re: Doing a join On Wed, 2006-08-02 at 11:13 -0600, 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