普通的去重可以用distinct或者用group by实现
当Mysql中按某一字段去重,并查询去重后的所有字段:
SELECT
*
FROM
entrust_social_security_fund AA
WHERE
id = (
SELECT
MIN(id)
FROM
entrust_social_security_fund BB
WHERE
BB.project_employee_id = AA.project_employee_id
GROUP BY
BB.project_employee_id
);