Select and display only duplicate records in mysql

后端 未结 12 2137
南旧
南旧 2020-12-08 06:56

This question is pretty simple I for some reason cant get the proper result to display only the duplicate records

Table   : Paypal_ipn_orders
id                      


        
12条回答
  •  南笙
    南笙 (楼主)
    2020-12-08 07:33

    Try this query:

    SELECT id, COUNT( payer_email ) `tot`
    FROM paypal_ipn_orders
    GROUP BY id
    HAVING `tot` >1
    

    Does it help?

提交回复
热议问题