I am attempting to include all members in a query. The Members table is linked to the Tips table via a MeetingDate which is an Integer and could be linked back to the Meetings table if I wanted the specific date.
Here is the query I wrote:
--------------------------
SELECT Concat( m.FirstName, ' ', m.LastName ) AS Name, Sum( IFNULL( t.TipAmount, 0 ) ) AS RevenueGiven
FROM Members m
LEFT JOIN Tips t ON m.MemberId = t.TipFrom
WHERE t.MeetingDate =15
GROUP BY Name
ORDER BY m.LastName, m.FirstName
LIMIT 0 , 30
--------------------------
When I run this, one member who provided no tips at the specific meeting is excluded despite the LEFT JOIN construct. When I remove the WHERE clause, he is included since he provided tips at other meetings.
It appears MySQL is ignoring the LEFT JOIN since the member had no tips for the specific meeting date. Any ideas?