On 5/19/2010 1:50 PM, Shawn Wilsher wrote:Er, and I managed to botch the SQL in the last two examples. Those should be (if my non-tested SQL-fu is right):
SELECT name, COUNT(kids.id) FROM kids INNER JOIN candySales ON kids.id = candySales.kidId GROUP BY kids.id;
and: SELECT name, COUNT(kids.id) FROM kids LEFT JOIN candySales ON kids.id = candySales.kidId GROUP BY kids.id; respectively. Cheers, Shawn
smime.p7s
Description: S/MIME Cryptographic Signature