forecast_api/build/build_merge.sql

20 lines
336 B
SQL

SELECT
version
,iter
,oseas
,g.sspr || ' ' || to_char(odate,'Mon') omon
,COUNT(*) cnt
,sum(fb_val_loc * r_rate) amt
FROM
rlarp.osmf_stage o
INNER JOIN rlarp.gld g ON
o.odate <@ g.drange
GROUP BY
version
,iter
,oseas
,g.sspr || ' ' || to_char(odate,'Mon')
ORDER BY
oseas
,omon