diff --git a/sql/quote_review.pg.sql b/sql/quote_review.pg.sql index b638ac3..5f77c56 100644 --- a/sql/quote_review.pg.sql +++ b/sql/quote_review.pg.sql @@ -56,8 +56,8 @@ lq AS MATERIALIZED ( ,i.mpck pltq -- ,(pricing->'guidance'->'finalPrice'->>'Price')::numeric guidance -- ,pricing->'guidance'->'finalPrice'->>'Reason' reason - ,i.curstdus cstd_usd - ,i.futstdus fstd_usd + ,lq.curstdus cstd_usd + ,lq.futstdus fstd_usd ,CASE WHEN i.glec = '1NU' THEN --if more than 8/24 pallets, use floor @@ -124,4 +124,4 @@ lq AS MATERIALIZED ( ,price_usd numeric ) ON TRUE ) -SELECT * FROM hist --WHERE qid = 108596 +SELECT * FROM hist --WHERE qid = 108655