forecast_api/route_meta/list_months.sql

15 lines
284 B
MySQL
Raw Normal View History

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)