expand the new target definition into a complete listing
This commit is contained in:
parent
6e2e806f9b
commit
8974095341
@ -1,61 +1,67 @@
|
|||||||
SELECT
|
|
||||||
ui_json->'details'
|
|
||||||
FROM pricequote.single_price_call(
|
|
||||||
'FARM0001',
|
|
||||||
'KEYB0001',
|
|
||||||
'HCA10000B661100',
|
|
||||||
'v1:T..CSE..D',
|
|
||||||
50000
|
|
||||||
) f;
|
|
||||||
|
|
||||||
SELECT
|
|
||||||
ui_json->'details'
|
|
||||||
FROM pricequote.single_price_call(
|
|
||||||
'FARM0001',
|
|
||||||
'KEYB0001',
|
|
||||||
'HZP3E103E21D050',
|
|
||||||
'v1:C..BDL..',
|
|
||||||
50000
|
|
||||||
) f;
|
|
||||||
|
|
||||||
SELECT
|
|
||||||
ui_json
|
|
||||||
FROM pricequote.single_price_call(
|
|
||||||
'BFGS0001',
|
|
||||||
'BOBS0002',
|
|
||||||
'HTI10754B12B024LXB04',
|
|
||||||
'v1:L.L.PLT..',
|
|
||||||
172000
|
|
||||||
) f;
|
|
||||||
|
|
||||||
SELECT * FROM pricequote.lastpricedetail l WHERE customer = 'HYBELS' AND l.partgroup = 'HZP3E100';
|
|
||||||
|
|
||||||
SELECT
|
|
||||||
pc.expl
|
|
||||||
FROM
|
|
||||||
pricequote.live_quotes
|
|
||||||
LEFT JOIN LATERAL pricequote.single_price_call(
|
|
||||||
billto, shipto, part, v1ds, units_each
|
|
||||||
) pc ON TRUE
|
|
||||||
WHERE
|
|
||||||
qid = 113173
|
|
||||||
AND qrn = 32;
|
|
||||||
|
|
||||||
-- SELECT
|
-- SELECT
|
||||||
-- c.compset,
|
-- ui_json->'details'
|
||||||
-- c.stlc,
|
-- FROM pricequote.single_price_call(
|
||||||
-- c.floor,
|
-- 'FARM0001',
|
||||||
-- b.ds,
|
-- 'KEYB0001',
|
||||||
-- b.chan,
|
-- 'HCA10000B661100',
|
||||||
-- b.tier,
|
-- 'v1:T..CSE..D',
|
||||||
-- b.vol,
|
-- 50000
|
||||||
-- b.val,
|
-- ) f;
|
||||||
-- b.price,
|
--
|
||||||
-- json_pretty(to_json(b.math)) math
|
-- SELECT
|
||||||
|
-- ui_json->'details'
|
||||||
|
-- FROM pricequote.single_price_call(
|
||||||
|
-- 'FARM0001',
|
||||||
|
-- 'KEYB0001',
|
||||||
|
-- 'HZP3E103E21D050',
|
||||||
|
-- 'v1:C..BDL..',
|
||||||
|
-- 50000
|
||||||
|
-- ) f;
|
||||||
|
--
|
||||||
|
-- SELECT
|
||||||
|
-- ui_json
|
||||||
|
-- FROM pricequote.single_price_call(
|
||||||
|
-- 'BFGS0001',
|
||||||
|
-- 'BOBS0002',
|
||||||
|
-- 'HTI10754B12B024LXB04',
|
||||||
|
-- 'v1:L.L.PLT..',
|
||||||
|
-- 172000
|
||||||
|
-- ) f;
|
||||||
|
--
|
||||||
|
-- SELECT * FROM pricequote.lastpricedetail l WHERE customer = 'HYBELS' AND l.partgroup = 'HZP3E100';
|
||||||
|
--
|
||||||
|
-- SELECT
|
||||||
|
-- pc.expl
|
||||||
-- FROM
|
-- FROM
|
||||||
-- pricequote.core_target c
|
-- pricequote.live_quotes
|
||||||
-- LEFT JOIN LATERAL pricequote.build_pricing_path_base (options||jsonb_build_object('entity','Anchor','attr',c.stlc,'val',c.floor,'func','Price')) b ON b.lastflag
|
-- LEFT JOIN LATERAL pricequote.single_price_call(
|
||||||
-- LIMIT 10000;
|
-- billto, shipto, part, v1ds, units_each
|
||||||
|
-- ) pc ON TRUE
|
||||||
|
-- WHERE
|
||||||
|
-- qid = 113173
|
||||||
|
-- AND qrn = 32;
|
||||||
|
|
||||||
|
create table pricequote.target_prices_base as (
|
||||||
|
with
|
||||||
|
expand AS (
|
||||||
|
SELECT
|
||||||
|
c.compset,
|
||||||
|
c.stlc,
|
||||||
|
c.floor,
|
||||||
|
b.ds,
|
||||||
|
b.chan,
|
||||||
|
b.tier,
|
||||||
|
b.vol,
|
||||||
|
b.val,
|
||||||
|
b.price,
|
||||||
|
json_pretty(to_json(b.math)) math
|
||||||
|
FROM
|
||||||
|
pricequote.core_target c
|
||||||
|
LEFT JOIN LATERAL pricequote.build_pricing_path_base (options||jsonb_build_object('entity','Anchor','attr',c.stlc,'val',c.floor,'func','Price')) b ON b.lastflag
|
||||||
|
)
|
||||||
|
-- select count(*) from expand
|
||||||
|
select * from expand
|
||||||
|
) with data;
|
||||||
|
|
||||||
-- SELECT
|
-- SELECT
|
||||||
-- stlc, ds, chan, tier, vol, price, math
|
-- stlc, ds, chan, tier, vol, price, math
|
||||||
|
Loading…
Reference in New Issue
Block a user