缺乏主键,取最新的记录

select a.guigename,a.thisdayguigeprice,a.createdate
from dailystandardguigeprice as a
inner join (select guigename,max(createdate) as mcreatedate from dailystandardguigeprice group by guigename) as b
on a.guigename=b.guigename and a.createdate=b.mcreatedate

  

上一篇:模板库之vector


下一篇:少用float浮动