Try it this way:

DECLARE @StartDate DATETIME

Set @StartDate = GETDATE()

DECLARE @EndDate DATETIME

SET @EndDate = DATEADD(second,-1,DATEADD(month,1,@StartDate))

SELECT TOP 50

A.AccountID,

Username,

PortraitID,

SUM(Points) AS Points,

SUM(Heads) AS Heads,

SUM(CASE WHEN Stakes = 4 THEN Heads ELSE 0 END) AS USD100_Heads,

SUM(CASE WHEN Stakes = 3 THEN Heads ELSE 0 END) AS USD30_Heads,

SUM(CASE WHEN Stakes = 2 THEN Heads ELSE 0 END) AS USD20_Heads,

SUM(CASE WHEN Stakes = 1 THEN Heads ELSE 0 END) AS USD10_Heads,

SUM(CASE WHEN Stakes = 0 THEN Heads ELSE 0 END) AS USD5_Heads

From HeadhunterLeaderboardPoints HHLBP

Left Join HeadhunterLeaderboardHeads HHLBH On HHLBP.AccountID = HHLBH.AccountID AND HHLBP.TournamentID = HHLBH.TournamentID

Inner Join Account A On HHLBP.AccountID = A.AccountID

Left Join AccountPreferences AP On HHLBP.AccountID = AP.AccountID

WHERE HHLBP.TournamentStartDate BETWEEN @StartDate AND @EndDate

AND HHLBH.TournamentStartDate BETWEEN @StartDate AND @EndDate

GROUP BY

A.AccountID,

Username,

PortraitID

ORDER BY SUM(Points) DESC

DECLARE @StartDate DATETIME

Set @StartDate = GETDATE()

DECLARE @EndDate DATETIME

SET @EndDate = DATEADD(second,-1,DATEADD(

SELECT TOP 50

A.AccountID,

Username,

PortraitID,

SUM(Points) AS Points,

SUM(Heads) AS Heads,

SUM(CASE WHEN Stakes = 4 THEN Heads ELSE 0 END) AS USD100_Heads,

SUM(CASE WHEN Stakes = 3 THEN Heads ELSE 0 END) AS USD30_Heads,

SUM(CASE WHEN Stakes = 2 THEN Heads ELSE 0 END) AS USD20_Heads,

SUM(CASE WHEN Stakes = 1 THEN Heads ELSE 0 END) AS USD10_Heads,

SUM(CASE WHEN Stakes = 0 THEN Heads ELSE 0 END) AS USD5_Heads

From HeadhunterLeaderboardPoint

Left Join HeadhunterLeaderboardHeads

Inner Join Account A On HHLBP.AccountID = A.AccountID

Left Join AccountPreferences AP On HHLBP.AccountID = AP.AccountID

WHERE HHLBP.TournamentStartDate BETWEEN @StartDate AND @EndDate

AND HHLBH.TournamentStartDate BETWEEN @StartDate AND @EndDate

GROUP BY

A.AccountID,

Username,

PortraitID

ORDER BY SUM(Points) DESC