select DISTINCT 编号,日期 from yourtable
group by 编号,日期
order by 编号 ASC,日期 DESC
程序中可用
exec('select DISTINCT 编号,日期 from yourtable
group by 编号,日期
order by 编号 ASC,日期 DESC
')