title: Select columns outside of group by
body: <p>I am looking to select the first and last click by each ID, along with the corresponding source. Here is a sample table:</p>
  
  <pre><code>ID   Click      Source  
  --------------------------
  1      1        Google  
  1      2        Facebook   
  1      3        Yahoo   
  2      1        Google
  2      2        Yahoo 
  3      1        Facebook
  4      1        Yahoo
  5      1        Pinterest
  5      2        Google
  </code></pre>
  
  <p>Here is the desired result:</p>
  
  <pre><code>ID   First      Last
  -------------------------
  1    Google     Yahoo
  2    Google     Yahoo
  3    Facebook   Facebook
  4    Yahoo      Yahoo
  5    Pinterest  Google
  </code></pre>
  
  <p>I've already managed to get the first click by simply setting click=1 in the where clause. I am not able to get MAX(click) without grouping by ID and Source. When I include the Source in the group by I don't get the results I want.</p>