title: Finding Duplicate Rows in MySQL (Composite Key)
body: <p>I have a table with rows in the following format:</p>
  
  <pre><code>transactionDate, purchaseOrderId
  8/8/2012, 55
  8/9/2012, 55
  8/8/2012, 88
  8/9/2012, 55
  8/10/2012, 77
  </code></pre>
  
  <p>I want to find all rows where the transactionDate and purchaseOrderId are both exact. So the following two rows are duplicates:</p>
  
  <pre><code>8/9/2012, 55
  8/9/2012, 55
  </code></pre>
  
  <p>I tried using the following query:</p>
  
  <pre><code>SELECT
      transactionDate, purchaseOrderId
  FROM
      purchases
  GROUP BY
      transactionDate, purchaseOrderId
  HAVING COUNT(*) &gt; 1;
  </code></pre>
  
  <p>However it returned the Aug 8th result in addition to the Aug 9th result. How do I make it only return fields where both columns are duplicated (instead of returning all transactions for each date)?</p>
  
  <p>Thanks.</p>