Hi,
It looks like you neeed to use a pivot statement to view the data in the required format.
You would need something like:
SELECT month, 'spm' AS spm, 'echo' AS echo, 'sss' AS sss
FROM
(SELECT month, MachineType, Sum_Column
FROM YourTable)
PIVOT
(
SUM (Sum_Column)
FOR YourTable IN
( spm,echo,sss)
) AS pivoted_data
Click
* HERE * for a relevant article.
Hope it helps.