mysql 相同的字段值统计一次

2025-03-22 23:12:15
推荐回答(1个)
回答1:

select * from table where 部门ID=1 AND 支付状态=1 AND 主键 in(
select max(主键) from table group by 名称)