select * from tbname,(
select bid,max(coldate) coldate from tbname group by bid) t
where t.bid=tbname.bid and t.coldate=tbname.coldate;
select bid,max(coldate) coldate from tbname group by bid) t
where t.bid=tbname.bid and t.coldate=tbname.coldate;
from 表名 a, (select bid,max(date) from 表名 group by bid) b
where a.bid=b.bid and a.date=b.date
from 表名 a, (select bid,max(date) date from 表名 group by bid) b
where a.bid=b.bid and a.date=b.date order by a.id
不知道这样可不可以啊!