How about this?
Code:SELECT TO_CHAR( posting_date, 'YYYYMM' ) posting_date, SUM( amount ) sum_amt FROM w_card_transaction WHERE posting_date > TO_DATE( '31-12-2003', 'DD-MM-YYYY' ) AND posting_date < TO_DATE( '01-01-2005', 'DD-MM-YYYY' ) GROUP BY TO_CHAR( posting_date, 'YYYYMM' ) ORDER BY TO_CHAR( posting_date, 'YYYYMM' );




Reply With Quote