我需要实现标识最小的显示出来,并且binglihao没有重复
以张三00为例,张三00有两条数据,一条标识是50,另一条是56
语句:
select * from (select h.xingming as xingming,h.binglihao as binglihao,j.biaoshi as biaoshi from jcd j,huanzhexinxi h where j.huanzhe_id=h.id and kdys='oims' and kd_time>'2016-01-21 00:00:00' order by j.biaoshi) k group by k.binglihao;
可以实现
效果:
语句:
select h.xingming as xingming,h.binglihao as binglihao,j.biaoshi as biaoshi from jcd j,huanzhexinxi h where j.huanzhe_id=h.id and kdys='oims' and kd_time>'2016-01-21 00:00:00' group by h.binglihao order by j.biaoshi;
达不到预期效果
效果: