title: SQL left outer join to a min value of right table
body: <p>I have two tables, lets say <code>table1</code> and <code>table2</code>.</p>
  
  <pre><code> table1 || table2
  --------||-------------
   col1   || col1 | col2 
  --------||------|------
   a      || a    | 4    
   b      || a    | 2    
   c      || a    | 5    
   d      || b    | 1
          || b    | 3
          || d    | 6
  </code></pre>
  
  <p>With <code>SELECT table1.col1, table2.col2 FROM table1 LEFT OUTER JOIN table2 ON table1.col1 = table2.col1</code> I get following:</p>
  
  <pre><code> table1.col1 | table2.col2
  -------------|-------------
   a           | 4           
   a           | 2           
   a           | 5           
   b           | 1           
   b           | 3           
   c           | NULL           
   d           | 6
  </code></pre>
  
  <p>How is it possible to achieve this (only get the minimum of <code>table2.col2</code> so that there's no entry of <code>table1.col1</code> more than once):</p>
  
  <pre><code> table1.col1 | table2.col2
  -------------|-------------
   a           | 2           
   b           | 1           
   c           | NULL           
   d           | 6
  </code></pre>
  
  <p>Or is it a wrong approach?</p>