title: SQL INNER JOIN with DISTINCT rows?
body: <pre><code>SELECT collections.title, collections.uniqueID, uploads.uniqueID as thumb 
  FROM collections 
  INNER JOIN uploads ON collections.uniqueID = uploads.uploadGroup 
  WHERE collections.owner = @owner
  </code></pre>
  
  <p>in this instance if I have 3 rows in "uploads" that have the matching uniqueid/uploadgroup (as in 3 uploads in a collection) this gives me back 3 rows.</p>
  
  <p>what I'm looking for is ONE row for each DISTINCT COLLECTIONS.UNIQUEID - is this possible?</p>
  
  <p>so when collections has</p>
  
  <pre><code>1 | title | idhere
  </code></pre>
  
  <p>and uploads has</p>
  
  <pre><code>1 | uniqueID1 | idhere
  2 | uniqueID2 | idhere
  3 | uniqueID3 | idhere
  </code></pre>
  
  <p>I'm currently returning</p>
  
  <pre><code>1 | title | uniqueID1
  2 | title | uniqueID2
  3 | title | uniqueID3
  </code></pre>
  
  <p>when all I want to return is</p>
  
  <pre><code>1 | title | uniqueID1
  </code></pre>