I have two tables l & C which are linked by two fields l.mID and c.mID the c table holds three types of records cs, ls, & vs with my query I need to select all records from l and as part of the query have three columns showing totals for cs, ls & vs;
SO far I am using an outer join:
SELECT l.*, COUNT(*) FROM l LEFT OUTER JOIN c ON c.mID = l.mID WHERE l.mID = 2
But this just appends one column with a full total any help would be great thanks.
SUM()for each of those columns?