Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Selecione e exiba apenas registros duplicados no 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