select Id,Title, PostTypeId,Score, RANK() OVER (PARTITION...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Robotics

Q&A for professional robotic engineers, hobbyists, researchers and students

select Id,Title, PostTypeId,Score,
RANK() OVER   
    (PARTITION BY Id ORDER BY Score DESC) AS ScoreRankByType
    , max(Score) OVER (PARTITION BY PostTypeId ) AS MaxScoreByType
into #Post 
from Posts
select * from #Post
/*
select PostType, max(Score) 
group by PostType into #maxScore 
from Posts*/

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results