title: SQL: Left join but select only one row with least created date
body: <p>Let's say I have this table:</p>
  
  <p>Table A:</p>
  
  <pre><code> id   name    
  ---   ---  
   1    John   
  </code></pre>
  
  <p>Table B:</p>
  
  <pre><code>  id     content    Aid      Date
    ---      ---      ---     ----------
    100      abc       1      2017-02-03 11:16:00
    101      xyz       1      2017-02-03 11:50:00
  </code></pre>
  
  <p>I want to join A and B such that the resulting table has only the one row from B with Date = minimum.</p>
  
  <p>My desired output: </p>
  
  <pre><code> id   name  content
  ---   ---   ------
   1    John    abc
  </code></pre>
  
  <p>My failed attempt at joining is giving me (1, John, xyz) row as well:</p>
  
  <pre><code>SELECT A.[id], A.[name], B.[content]
  FROM A
  LEFT JOIN B
  ON A.id = B.Aid
  </code></pre>
  
  <p>Later I tried doing a WHERE inside join but I'm not able to construct it:</p>
  
  <pre><code>SELECT A.[id], A.[name]
  FROM A
  LEFT JOIN B
  ON A.id = (SELECT Aid FROM B WHERE Date = (SELECT MIN(Date) FROM B 
  WHERE &lt;no idea where I'm going?&gt;)
  </code></pre>
  
  <p>Can someone please point me in the right direction?</p>