--Pivot
SELECT soundBranch AS Branch,
August,
September,
October
FROM (SELECT
dd.Monthname AS [Monthname],
dmasb.soundBranch,
1 AS Cnt
FROM dash_sharedMemberAtSoundBranch dmasb
LEFT OUTER JOIN DimDate dd
ON dd.Date = dmasb.dateOfTransaction
WHERE dmasb.dateOfTransaction BETWEEN '2015.08.01' AND GETDATE()
--AND dmasb.sharedBranch = 'BECU'
) AS SourceTable
PIVOT
(
sum(SourceTable.Cnt)
FOR SourceTable.MonthName IN (August, September, October)
) AS PivotTable
ORDER BY Branch