Considering this table:
create table t (EventId int
,Section int
,PlayerName nvarchar(50)
,Score int
,Rank int
)
I trying to writing the T-SQL that does have EventId as input and using the RANK function to rank by the score but with the sections separated (Ranking individual for each section, Rank 1 for highest score in each section and so on) and then setting/updating the Rank value
Here it is running on SEDE.