mysql查询多个条件去重
SELECT * FROM tb_user_customer a WHERE CONCAT(agent_id, '-', client_id) IN
(
SELECT CONCAT(agent_id, '-', client_id) AS ACID
FROM tb_user_customer
GROUP BY ACID HAVING COUNT(ACID) > 1
);
mysql查询多个条件去重
SELECT * FROM tb_user_customer a WHERE CONCAT(agent_id, '-', client_id) IN
(
SELECT CONCAT(agent_id, '-', client_id) AS ACID
FROM tb_user_customer
GROUP BY ACID HAVING COUNT(ACID) > 1
);