select * from ( select Player, Year, HomeRuns, Rank() over (Partition BY Player order by HomeRuns DESC, Year DESC) as Rank from Batting ) tmp where Rank = 1
DEMO2:
WITH ttts AS (
Select JournalID,ParentID,RANK() OVER (partition by ParentID orDER BY JournalID asc) AS rt From Journal_Category Where ParentID in (Select JournalID from Journal_Category where ParentID = 1) Group By ParentID,JournalID