求语句,该怎么解决

求语句时间---intA-----intB--11--12--24--....要搜索表中按时间倒叙排列后,对于每一个intA,他的最后一次

求语句
时间---intA-----intB
--             1                   1
--             1                   2
--             2                   4
--           ..                 ..
要搜索表中     按时间倒叙排列后,对于每一个intA,他的最后一次发生的B

结果以列表返回




[解决办法]
select t.* from 表 t where not exists(select 1 from 表 where intA=t.intA and 时间> t.时间)
[解决办法]
select * from 时间 a where not exists(select 1 from 时间 b where a.intA=b.intA and a.intB <b.intB)