I think this is common, is it?
If you have a table with SALES {Customer_ID, Price, SmallDateTime date}. How do you report all sales per month?
SALES {Customer_ID, Price, SmallDateTime date}
Try this
SELECT A.CAL_YEAR AS YEAR ,A.CAL_WEEK AS WEEK,SUM(B.SUM_OF_PROFIT) as profit FROM CALANDER A,SALES_FACT B WHERE A.DATE_ID=B.DATE_ID GROUP BY A.CAL_YEAR,A.CAL_WEEK;