Haven't tested it, but this might work ...
Alternatively ...Code:select to_char(posting_date,'Mon-YYYY'), sum(amount) 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,'Mon-YYYY'),Trunc(posting_date,'MON') order by Trunc(posting_date,'MON');
Ref DaPi's avatar -- have you ever read "The Picture of Dorian Gray"? 'Nuff said.Code:Select to_char(mth,'Mon-YYYY'),amt From ( select Trunc(posting_date,'MON') mth, sum(amount) 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 Trunc(posting_date,'MON') order by 1 )




Reply With Quote