title: Show First instance of records with duplicate values in colum
body: <p>I have these values in a table called <code>galley_images</code>:</p>
  
  <pre><code>id    gallery_id    image_id
  1             1            1
  2             1            2
  3             1            3
  4             2            4 
  5             2            5 
  6             2            6 
  7             2            7
  8             3            8
  </code></pre>
  
  <p>I want to return the results like this:</p>
  
  <pre><code>id    gallery_id    image_id
  1             1            1
  4             2            4
  8             3            8
  </code></pre>
  
  <p>Basically I only want the first instance of any record with a unique <code>gallery_id</code>.</p>
  
  <p>I have a solution using Access DB but need a solution for MySQL, Access solution was:</p>
  
  <pre><code>SELECT id, First(gallery_id) AS FirstOfgallery_id,  
             First(image_id) AS FirstOfimage_id
  FROM galley_images 
  GROUP BY id
  </code></pre>
  
  <p>Any help?</p>