Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
62ca1fcdf1 | |||
088797915c | |||
20e5e4fc42 | |||
bd8fde9474 | |||
d0cbd464cc |
@ -47,7 +47,7 @@ CREATE MATERIALIZED VIEW rlarp.price_pool AS (
|
|||||||
AND o.mingd <> 'B52'
|
AND o.mingd <> 'B52'
|
||||||
--AND o.part like 'SQL035%'
|
--AND o.part like 'SQL035%'
|
||||||
--AND o.calc_status <> 'CANCELED'
|
--AND o.calc_status <> 'CANCELED'
|
||||||
--AND o.fs_line = '41010'
|
AND o.fs_line = '41010'
|
||||||
--AND o.dsm <> 'PW'
|
--AND o.dsm <> 'PW'
|
||||||
--AND i.coltierd <> 'C'
|
--AND i.coltierd <> 'C'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
|
@ -11,7 +11,7 @@ lq AS MATERIALIZED (
|
|||||||
FROM
|
FROM
|
||||||
pricequote.live_quotes lq
|
pricequote.live_quotes lq
|
||||||
WHERE
|
WHERE
|
||||||
qstat LIKE 'Submitted%'
|
qstat LIKE '%Submitted%'
|
||||||
)
|
)
|
||||||
---------------------guidance logic---------------------------------------
|
---------------------guidance logic---------------------------------------
|
||||||
,lqg AS (
|
,lqg AS (
|
||||||
@ -69,9 +69,9 @@ lq AS MATERIALIZED (
|
|||||||
-- if more than a pallet use the target price
|
-- if more than a pallet use the target price
|
||||||
ELSE CASE WHEN units_each >= 8*mpck THEN (lq.upperpricelimit + lq.lowerpricelimit) / 2
|
ELSE CASE WHEN units_each >= 8*mpck THEN (lq.upperpricelimit + lq.lowerpricelimit) / 2
|
||||||
-- if more than a pallet use the target price
|
-- if more than a pallet use the target price
|
||||||
ELSE CASE WHEN units_each >= 4*mpck THEN lq.upperpricelimit
|
ELSE CASE WHEN units_each >= 2*mpck THEN lq.upperpricelimit
|
||||||
-- if more than a pallet use the target price
|
-- if more than a pallet use the target price
|
||||||
ELSE lq.upperpricelimit * 1.15
|
ELSE lq.upperpricelimit * 1.05
|
||||||
END END END
|
END END END
|
||||||
ELSE
|
ELSE
|
||||||
CASE WHEN i.pricegroup ~ '(Hanger|Dish)' THEN
|
CASE WHEN i.pricegroup ~ '(Hanger|Dish)' THEN
|
||||||
|
Loading…
Reference in New Issue
Block a user