Mysql 求每组第一名的信息,以下是参考SQL语句:
select h.*
from wom_interface_health h,(select max(id) as id ,tenant_id from wom_interface_health group by tenant_id) m
where h.tenant_id=m.tenant_id and h.id=m.id
Mysql 求每组第一名的信息,以下是参考SQL语句:
select h.*
from wom_interface_health h,(select max(id) as id ,tenant_id from wom_interface_health group by tenant_id) m
where h.tenant_id=m.tenant_id and h.id=m.id