Skip to Content
0
Dec 15, 2020 at 07:23 AM

Sales Analysis - Sum of total Qty( Item) and Sales Amount of customers

21 Views Last edit Dec 15, 2020 at 07:22 AM 2 rev

I have this query :

SELECT T0."CardCode", T0."CardName", T0."DocDate", T1."ItemCode", T1."Dscription", T1."Quantity", T1."UseBaseUn", T1."UomCode", T0."DocStatus" , T0."CANCELED" FROM OINV T0 INNER JOIN INV1 T1 ON T0."DocEntry" = T1."DocEntry" WHERE T0."CANCELED" = 'N' and T0."CardCode" = '[%3]' AND T0."DocDate" >= N'[%0]' and T0."DocDate" <= N'[%1]'

and I want to count the SUM of Quantity

can you help me to write the correct query for that, please