MySQL Forums
Forum List  »  Newbie

Re: Multiple Counts - Multiple Tables - 1 Result - Using Left Join
Posted by: Shantanu Oak
Date: April 21, 2005 07:01AM

I tried it. But it fails at...

LEFT JOIN
members as ma,
attachments as a
ON
a.member_id = ma.member_id AND
ma.department_id = d.department_id

If I change it to...
LEFT JOIN
members as ma
ON
ma.department_id = d.department_id
LEFT JOIN
attachments as a
ON
a.member_id = ma.member_id

I get different results (version 3.23.49).

-- Department | Members | Executives | Admins | Reps | Attachments | Transactions
-- ----------------------------------------------------------------------------
-- PDQ | 5 | 4 | 2 | 2 | 3 | 3

Options: ReplyQuote


Subject
Written By
Posted
Re: Multiple Counts - Multiple Tables - 1 Result - Using Left Join
April 21, 2005 07:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.