SELECT distinct T0.docnum , T1.ITEMCODE,T0.[U_BN], T0.[U_BD], T0.[U_RequisitionNo], T0.[CardName], T1.[PriceBefDi],T1.[Quantity],
T0.[DocTotalSy] as Week1,0 as Week2,0 as Week3,0 as Week4
FROM OPDN T0 INNER JOIN PDN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode Inner Join OUSR T4 on T2.usersign = T4.internal_k
INNER JOIN OITG T3 ON T2.UserSign = T4.internal_k
where T0.[U_BD] BETWEEN ' 2015-06-01 00:00:00.000' and '2015-06-07 00:00:00.000' and T2.[QryGroup9] = 'y'and T2.[QryGroup18] = 'y' and T2.[QryGroup19] = 'y'
and T2.[QryGroup10] = 'y'and T2.[QryGroup11] = 'y'and T2.[QryGroup12] = 'y'and T2.[QryGroup13] = 'y'and T2.[QryGroup14] = 'y'and T2.[QryGroup15] = 'y'and T2.[QryGroup16] = 'y'and T2.[QryGroup17] = 'y'
and T2.[QryGroup20] = 'y'and T2.[QryGroup21] = 'y'and T2.[QryGroup22] = 'y'and T2.[QryGroup23] = 'y'
try to get data from grpo and item properties
thx in advance