isolate short an over shipments
This commit is contained in:
parent
7e4049d27d
commit
94ae5e192c
15
over_under_ship.sql
Normal file
15
over_under_ship.sql
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
SELECT
|
||||||
|
calc_status,
|
||||||
|
flag,
|
||||||
|
sum(fb_val_loc * r_rate) filter (where fb_qty < 0) overship,
|
||||||
|
sum(fb_val_loc * r_rate) filter (where fb_qty > 0) undership
|
||||||
|
FROM
|
||||||
|
rlarp.osm_dev
|
||||||
|
WHERE
|
||||||
|
oseas = 2021
|
||||||
|
AND version = 'ACTUALS'
|
||||||
|
AND calc_status = 'CLOSED'
|
||||||
|
AND flag = 'REMAINDER'
|
||||||
|
GROUP BY
|
||||||
|
calc_status,
|
||||||
|
flag;
|
Loading…
Reference in New Issue
Block a user