title: Get Duplicate Records with Primary Key
body: <p>iam using sqso I have 3 fields:</p>
  
  <pre><code>ID        CustomerNo        Date
  1           0009                9/9/2011
  2           0009                9/9/2011
  3           0009                9/9/2011
  4           0010                9/9/2011
  </code></pre>
  
  <p>i want to determine the records with the same customerno and date and get each of their unique id.</p>
  
  <pre><code>ID        CustomerNo        Date
  1           0009                9/9/2011
  2           0009                9/9/2011
  3           0009                9/9/2011
  </code></pre>
  
  <p>How can I do this? i tried this code:</p>
  
  <pre><code>SELECT DISTINCT S1.ID,  S1.customerno, S1.DATE
  FROM TABLE AS S1
  INNER JOIN TABLE AS S2
  ON  S1.DATE=S2.DATE AND S1.CUSTOMERNO=S2.CUSTOMERNO 
  AND S2.id &lt;= S1.id
  GROUP BY S1.customerno, S1.id , S1.DATE
  </code></pre>
  
  <p>but it also get the record no.4, different customer no but with the same date.</p>
  
  <p>i want to get only those that are duplicate in customerno and date.</p>