Algo asi :)
Código SQL:
Ver originalSELECT isnull(SUM([1996-7]),0) AS [1996-Julio],isnull(SUM([1996-8]),0) AS [1996-Agosto],isnull(SUM([1996-9]),0) AS [1996-Septiembre],isnull(SUM([1996-10]),0) AS [1996-Octubre],isnull(SUM([1996-11]),0) AS [1996-Noviembre],isnull(SUM([1996-12]),0) AS [1996-Diciembre],isnull(SUM([1997]),0) AS [1997],isnull(SUM([1998]),0) AS [1998],shipcountry FROM
(
SELECT
CASE WHEN datepart(yyyy,OrderDate)=1996 AND datepart(mm,orderdate)=7 THEN SUM(total) END AS [1996-7],
CASE WHEN datepart(yyyy,OrderDate)=1996 AND datepart(mm,orderdate)=8 THEN SUM(total) END AS [1996-8],
CASE WHEN datepart(yyyy,OrderDate)=1996 AND datepart(mm,orderdate)=9 THEN SUM(total) END AS [1996-9],
CASE WHEN datepart(yyyy,OrderDate)=1996 AND datepart(mm,orderdate)=10 THEN SUM(total) END AS [1996-10],
CASE WHEN datepart(yyyy,OrderDate)=1996 AND datepart(mm,orderdate)=11 THEN SUM(total) END AS [1996-11],
CASE WHEN datepart(yyyy,OrderDate)=1996 AND datepart(mm,orderdate)=12 THEN SUM(total) END AS [1996-12],
CASE WHEN datepart(yyyy,OrderDate)=1997 THEN SUM(total) END AS [1997],
CASE WHEN datepart(yyyy,OrderDate)=1998 THEN SUM(total) END AS [1998],
ShipCountry
FROM(
SELECT
OrderDate,(UnitPrice * Quantity) AS total, ShipCountry
FROM [ORDER Details] AS t1
LEFT JOIN Orders AS t2 ON (t1.OrderID=t2.OrderID)
--where shipcountry='Argentina'
--group by OrderDate
) AS t1
GROUP BY ShipCountry,orderdate
) AS t2 GROUP BY ShipCountry
saludos!