title: dedupe script help
body: <p>I have a table where I want to delete duplicate rows. The duplicate rows are based on the attributeID, section, keyid, productId, and value fields. Each duplicate row does have a unique ID, <strong>productattributeID</strong>.</p>
  
  <p>The following script shows which rows are duplicated:</p>
  
  <pre><code> select aa.attributeID,section,keyid,productID, value,count(*)
  from productattribute PA
  inner join AvailableAttribute AA on AA.AttributeID = PA.productID
  group by aa.attributeID,section,keyid,productID, value
  having count(*)&gt;1
  </code></pre>
  
  <p>I am struggling to write a script which will delete all but one of each row.
  Can any one help?</p>
  
  <p>Thanks</p>