Hi experts
when i run this below attached Query with One more field 'DocDate', the items are repeating,
how can i stop this item repeating issue
=========================================
SELECT t0.itemcode,max(t0.Dscription) 'Item Name', Count(T0.ItemCode) 'No. of Transaction',t3.ItmsGrpNam
from dbo.INV1 t0
INNER JOIN dbo.OINV t1 on t1.docentry = t0.docentry
left outer join dbo.OITM t2 on t0.ItemCode = t2.ItemCode
left outer join dbo.OITB t3 on t2.ItmsGrpCod = t3.ItmsGrpCod
WHERE t1.DocType = 'I' AND t1.DocDate BETWEEN '2015-06-01 13:28:15' and '2016-08-17 13:28:15' and t1.CANCELED = 'N' and t0.BaseType <> 14
GROUP BY t0.itemcode,t3.ItmsGrpNam
order by t0.ItemCode asc
===================================================================================
Regards