volkandrey,
declare @UniformIsu table (MaterialR3 int, Party int, MaterialText int)
insert into @UniformIsu values (1,1,1), (1,2,2), (2,3,3),(2,4,4)
select top 1 with ties
MaterialR3,
Party,
MaterialText
from
@UniformIsu
order by
row_number() over (partition by MaterialR3 order by Party)