
SELECT
    oseas
    ,extract('month' from odate) month
    ,sum(fb_qty) fb_qty
    ,sum(fb_val_loc) fb_val_loc
    ,sum(fb_cst_loc) fb_cst_loc
FROM
    rlarp.osm_ppfa_varto_mv
WHERE

    AND calc_status <> 'CANCELED'
GROUP BY
    oseas
    ,extract('month' from odate)