title: Why LEFT OUTER JOIN reduces rows from left table?
body: <p>Just want to show all data in table A and LEFT JOIN table B with coorelate subquery but fail to get all data in table A</p>
  
  <pre><code>SELECT a.id FROM tableA a 
  LEFT JOIN tableB b1 ON a.id = b1.id
  WHERE date = (SELECT MAX(date) FROM tableB b2 WHERE b1.id= b2.id)
  </code></pre>
  
  <pre>
  tableA
  
  id
  ======
  1001
  1002
  1003
  1004
  
  tableB
  
  id   date
  =============
  1001 20160101
  1001 20160102
  1003 20160102
  1003 20160105
  
  Expected Result
  
  id   date
  ===============
  1001 20160102
  1002 NULL
  1003 20160105
  1004 NULL
  
  Engine Return
  
  id   date
  =============
  1001 20160102
  1003 20160105
  </pre>