如果10 20 33, 50对于1是唯一的,sql 2000可以实现,否则实现不了。
;with cte as(select *,rowNum=ROW_NUMBER() over(partition by id order by value) from tb)select case when rowNum=1 then cast(id as varchar) else '' end AS id,value from cte