Select date_part('month',cast(paid_date as date)) as mon ,to_char(cast(paid_date as date),'month') as m,(sum(net_amount)/10000000)::DECIMAL(15,2) as amount from pao.receipt_paid where paid_date between '04/01/2024' and '03/31/2025' group by date_part('year',cast(paid_date as date)),to_char(cast(paid_date as date),'month'),date_part('month',cast(paid_date as date)) order by date_part('year',cast(paid_date as date)),date_part('month',cast(paid_date as date)) 0