select distinct num,id from 表 order by id desc
distinct order by id desc
select top 1 distinct num,id from table order by id desc