Q&A about the site for artists and crafters
select *, row_number() over (partition by PostTypeId order by PostTypeId) FROM ( select Id, PostTypeId, SUM(Score) tmp_sum from posts where id<50 group by Id,PostTypeId) tmp_tble