第1个回答 2010-11-06
select * from a where exists (select 1 from (select 工号,max(消费时间) as 消费时间 group by 工号) as b where a.工号=b.工号 and a.消费时间=b.消费时间)
第2个回答 2010-11-06
select top 1 * from 消费明细表 where 工号=工号 order by 消费时间 desc
第3个回答 2010-11-06
select gonghao,kahao,max(xiaofeishijian) from A group by gonghao order by kahao