price_api/sql/livequotes.pg.sql

11 lines
324 B
SQL

SELECT
lq.*
,pricing->'guidance'->'finalPrice'->>'Price'
,pricing->'guidance'->'finalPrice'->>'Reason'
FROM
pricequote.live_quotes lq
JOIN LATERAL rlarp.guidance_r1(
rlarp.get_guidance_dseg(lq.billto,lq.shipto,substring(lq.part,1,8),lq.v1ds,lq.units_each,2024)
) pricing ON TRUE
LIMIT 1000