title: Left join on dates all dates
body: <p>I have several tables with dates that I'm trying to join to to make a large table where the data is grouped by date.</p>
  
  <p>I'm accomplishing this right now by LEFT JOIN'ing to subselect's generated from the tables that I need to join to ( a lot of them are the same table with different where queries and involve SUM and COUNT so I think I have to use subselects ). The problem that I'm having is that if one of the dates doesn't existing in the first table then it doesn't show up in the table even if there are rows in subsequent tables that it's joined to with that date. I'm joining based upon DATE(datetime_column). </p>
  
  <p>So it's like</p>
  
  <pre><code>SELECT date, col 1 
  FROM a 
     LEFT JOIN (SELECT date, col2 FROM a1) a2 ON DATE(a.date)=DATE(a2.date) 
     LEFT JOIN (SELECT date, col3 FROM a3) a4 ON DATE(a3.date)=DATE(a4.date) 
  </code></pre>
  
  <p>Make sense? Probably not.. </p>