From 8119255e465748aa319bdee021623b51f017c557 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 7 Nov 2023 01:18:42 -0500 Subject: [PATCH] vault backup: 2023-11-07 01:18:42 --- sql/get_guidance.pg.sql | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sql/get_guidance.pg.sql b/sql/get_guidance.pg.sql index 7bda696..3db46c9 100644 --- a/sql/get_guidance.pg.sql +++ b/sql/get_guidance.pg.sql @@ -11,6 +11,7 @@ DECLARE --_qty numeric; --_seas int; _mold text; + _stlc text; _cust text; _v1ds text; _v0ds text; @@ -32,9 +33,9 @@ BEGIN ----------------base product-------------------------------- SELECT - m.part_group, i.v1ds,i.v0ds,jsonb_build_object('assc',i.assc,'majg',i.majg::int,'coltier',i.coltier) idxk + m.part_group, i.stlc, i.v1ds,i.v0ds,jsonb_build_object('assc',i.assc,'majg',i.majg::int,'coltier',i.coltier) idxk INTO - _mold,_v1ds ,_v0ds, _iidx + _mold,_stlc,_v1ds , _v0ds, _iidx FROM "CMS.CUSLG".itemmv i INNER JOIN rlarp.molds m ON @@ -74,7 +75,7 @@ BEGIN FROM pricequote.market_setavgprice WHERE - mold = _mold + mold = _stlc AND season = _seas AND data_segment = _v1ds AND region = 'ALL';