Left outer join acting like inner join
Summary My goal is to find every user who has ever been assigned to a task, and then generate some statistics over a particular date range, and associate the stats with the original set of users. When no statistics exist for a particular user, I want a row in the output for the user but NULL values for the stats. I have a complex SQL query that looks like this (actual query at the bottom): SELECT user_name, changeday, project_name sum(hour_delta) AS hours, FROM ( … ) tasked_users LEFT OUTER JOIN ( … ) a ON tasked_users.id=a.assignee_id WHERE (changeday IS NULL) OR (changeday >= … AND changeday