This question is pretty simple I for some reason can't get the proper result to display only the duplicate records
Table : Paypal_ipn_orders
id payer_email
1 [email protected]
2 [email protected]
3 [email protected]
4 [email protected]
5 [email protected]
SELECT id, COUNT( payer_email ) `tot`
FROM paypal_ipn_orders
GROUP BY payer_email
HAVING `tot` >1
sample output
id tot
1 2
4 2
expected output
id payer_email
1 [email protected]
3 [email protected]
4 [email protected]
5 [email protected]
How do I make this happen?