I think I am right in saying that you are trying to display the Product Class and Months of sales - but you may not have sales in that period - so wish to show a ZERO.
You may require to create a Year/Month Reference Table with the product class - using this as the LEFT table - Join to the details table
Select ProductClass, Year, Month, SUM( ProductClass_SalesValue )
from DateProductClassTable as aa
Left outer join ProductClassDetails as bb
on aa.productClass = bb.productClass
group by ProductClass, Year, Month
Does this help or understand the problem ?
SQL 2008 DBA/DBD - MCTS/MCITP
Please don't trust me, test the solutions I give you before using them.