Hi RUC,
If the above syntax doesn't support on your DB then try below.
SELECT
sum(RPH.FACT.GRSREVENUE),
RPH.DIMDATES.MONTHYEAR,
RPH.DIMSTATEACCOUNT.STATECODE
FROM
RPH.DIMSTATEACCOUNT.STATESID
INNER JOIN
RPH.FACT_V ON RPH.DIMSTATEACCOUNT.STATESID = RPH.FACT.STATESID
RIGHT OUTER JOIN RPH.DIMDATES ON RPH.FACT.SALESDATE = RPH.DIMDATES.DATEVALUE
where
RPH.DIMDATES.DATEVALUE BETWEEN {ts '2011-01-01 00:00:00'} AND {ts '2012-12-13 11:56:55'}
GROUP BY
RPH.DIMDATES.MONTHYEAR,
RPH.DIMSTATEACCOUNT.statecode
Thanks
Mallik