Leszek Gniadkowski Commented 1 Years ago through
Puzzles
@dishdy
thanks, btw - very interesting challenge
and small logic fix (no effect on result)
,row_number() over (partition by c3.GroupId order by c3.sort1,c3.sort2,c3.sort3,c3.hist)
should be
,row_number() over (partition by c3.GroupId ord