SELECT * FROM pricing.lastprice WHERE customer = 'ALTMAN PLANTS' AND mold = 'XPR15CS1'


SELECT
	lp.*
	,p.*
	,j.*
FROM
	pricing.lastprice lp
	OUTER APPLY OPENJSON(lp.part_stats) AS p  -- unpacks part keys
	OUTER APPLY OPENJSON(p.value) 
	    WITH (
	        qty     FLOAT,
	        price   FLOAT,
	        odate   DATE,
	        ordnum  INT,
	        quoten  INT
	    ) AS j
WHERE
	customer = 'ALTMAN PLANTS'
	AND mold = 'XPR15CS1'	
	
	
	SELECT * FROM pricing.price_queue pq 