title: SELECT only partially distinct data
body: <p>How can you do a SELECT statement with a partial distinct?</p>
  
  <pre><code>Col1    Col2    Col3    Col4
  data1   data2   data3   abc
  data2   data3   data2   abcde
  data1   data2   data3   abcfef3f
  </code></pre>
  
  <p>For the dataset above, only return those with a distinct (Col1, Col2, Col3):</p>
  
  <pre><code>Col1    Col2    Col3    Col4
  data1   data2   data3   abc
  data2   data3   data2   abcde
  </code></pre>
  
  <p>Ultimately I want to insert this into a temp table like below.</p>
  
  <pre><code>INSERT INTO #tmp
  (
      [Col1],
      [Col2],
      [Col3],
      [Col4]
  )
  SELECT DISTINCT Col1, Col2, Col3, Col4
  FROM        store s
  INNER JOIN  address a ON s.addressid = a.id
  </code></pre>