Mysql
 sql >> Database >  >> RDS >> Mysql

Seleziona e visualizza solo i record duplicati in MySQL

SELECT id, payer_email
FROM paypal_ipn_orders
WHERE payer_email IN (
    SELECT payer_email
    FROM paypal_ipn_orders
    GROUP BY payer_email
    HAVING COUNT(id) > 1
)

sqlfiddle