title: view duplicate data in sql statement
body: <pre><code>SELECT REPLACE( nokp,  '-',  '' ) AS kp, nama, COUNT( id ) 
  FROM participants
  GROUP BY kp
  HAVING COUNT( * ) &gt;1
  </code></pre>
  
  <p>this is my sql statement to find the duplicate data. but actually i want to view all data in that  row that have duplicate nokp. (SELECT *) and view data that have duplicate nokp.</p>
  
  <p>EDIT..
  I have done what exactly i want to view. </p>
  
  <pre><code>SELECT REPLACE( nokp,  '-',  '' ) AS kp1, nama, daerah, parlimen, dun, pbt, mukim, alamat, telefon, j_kerja
  FROM participants
  WHERE REPLACE( nokp,  '-',  '' ) 
  IN (
  
  SELECT REPLACE( nokp,  '-',  '' ) AS kp
  FROM participants
  GROUP BY kp
  HAVING COUNT( * ) &gt;1
  )
  ORDER BY  `kp1` ASC 
  </code></pre>