forecast_api/route_meta/blend.sql
Paul Trowbridge 461794722f rename folder
2019-02-27 13:51:08 -05:00

33 lines
558 B
SQL

SELECT
version
,bill_cust
,ship_cust
,part
,promo
,terms
,plnt
,r_currency
,c_currency
,requestdate - orderdate rdiff
,shipdate - requestdate sdiff
,sum(fb_qty) fb_qty
,sum(fb_val_loc) fb_val_loc
,sum(fb_cst_loc) fb_cst_loc
FROM
rlarp.osm
WHERE
AND calc_status <> 'CANCELED'
GROUP BY
version
,bill_cust
,ship_cust
,part
,promo
,terms
,plnt
,r_currency
,c_currency
,requestdate - orderdate
,shipdate - requestdate