select t2.编号,t1.收费号,t2.时间,t2.次数
from table1 t1
inner join(
select 编号,count(*) 次数,Max(时间) as 时间
from table1
group by 编号
) t2 on t1.编号=t2.编号 and t1.时间=t2.时间
--这个给你做参考,注意不是答案,因为在最大的日期有两条以上记录时候,它会有问题
select t2.编号,t1.收费号,t2.时间,t2.次数
from table1 t1
join(
select 编号,count(*) 次数,Max(时间) as 时间
from table1
group by 编号
) t2 on t1.编号=t2.编号 and t1.时间=t2.时间