price_api/sql/livequotes.pg.sql

11 lines
324 B
MySQL
Raw Normal View History

2023-11-16 17:59:02 -05:00
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