LEFT JOIN (SELECT Z.MATNR
, (SELECT FRQTY FROM [THUOrder].[dbo].[ODA_ORG_Stock] A WHERE A.WERKS = Z.WERKS AND A.LGORT = 'N001' AND A.MATNR = Z.MATNR) FRQTY_N001
, (SELECT FRQTY FROM [THUOrder].[dbo].[ODA_ORG_Stock] A WHERE A.WERKS = Z.WERKS AND A.LGORT = 'C001' AND A.MATNR = Z.MATNR) FRQTY_C001
FROM ODA_ORG_Stock Z
WHERE WERKS = 'J103' AND LGORT IN ('N001', 'C001')
GROUP BY WERKS, MATNR) OOS