and if you need all 12 months for all countries regardless of whether data is available or not, you need to have calendar table like below
http://visakhm.blogspot.com/2010/02/generating-calendar-table.html
and use like
SELECT m.country,m.Period,
COALESCE(n.MonthlySales,0) AS MonthlySales
FROM
(
SELECT country,[Period]
FROM (SELECT DISTINCT country FROM table)t
CROSS JOIN (SELECT DATENAME(mm,m.[Date]) + ' ' + DATENAME(yyyy,m.[Date]) AS [Period] FROM dbo.CalendarTable (@yourstartdate,@yourenddate,0,1)f)u
)m
LEFT JOIN (SELECT s.Country, SUM(s.SalesAmount) as MonthlySales,d.YearMonth
FROM SalesHistory s
INNER JOIN Dates d ON s.SalesDate = d.DateID
GROUP BY s.Country, d.YearMonth)n
ON n.country = m.country
AND n.[YearMonth] = m.[period]
------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/