group by percentage of row to keep, and filter out -0-

This commit is contained in:
Paul Trowbridge 2021-08-03 08:26:05 -04:00
parent 752aeffa06
commit 2253d65047
1 changed files with 2 additions and 0 deletions

View File

@ -200,6 +200,7 @@ tdr AS (
CROSS JOIN log
WHERE
e.flag
AND e.plan_units <> 0
GROUP BY
o.fspr
,o.plnt
@ -230,6 +231,7 @@ tdr AS (
,o.r_rate
,o.c_currency
,o.c_rate
,(-e.qty/e.plan_units) --removal_rate
,o.calc_status
,o.flag
,o.order_date