删除money_wait表中 金额、订单号、商品id、用户id 相同的字段并保留id值最小的一个
DELETE FROM money_wait WHERE (money,orderid,num_iid,uid) in ( SELECT t.money,t.orderid,t.num_iid,t.uid from (
SELECT money,orderid,num_iid,uid from money_wait GROUP BY money_wait.orderid, money_wait.money, money_wait.num_iid, money_wait.uid HAVING count(1) > 1 ) t
) AND id NOT IN(
SELECT dt.nid FROM (
SELECT MIN(money_wait.id) as nid FROM money_wait GROUP BY money_wait.orderid, money_wait.money, money_wait.num_iid, money_wait.uid HAVING count(1) > 1 ) dt )