price_api/sql/get.sql

19 lines
401 B
SQL

SELECT
gset
,agglevel
,e.k
,e.v->>'units' units
,e.v->>'price_usd' price_usd
,e.v->>'target_price' target_price
FROM
rlarp.price_pool_dev
LEFT JOIN LATERAL JSONB_EACH(season) e(k,v) ON TRUE
WHERE
--gset @> '{"mold":"XNS0T1G3"}'::jsonb
gset @> jsonb_build_object(
'mold','TUH10000',
'vers','A'
)
ORDER BY
agglevel ASC;