SELECT dateadd(day, datediff(day, 0, A.PTARIH), 0) 'Tarih',U.ADI 'Ürün', S.URUNKODU,
SUM(S.ADET) 'Adet', SUM(S.TUTAR) 'Tutar'
FROM A_Adisyon  A
JOIN A_AdsSatir S ON S.FISID=A.ID
JOIN URUN     U ON U.KODU=S.URUNKODU
--WHERE ( (@TUMLISTE = 1) OR (A.TARIH BETWEEN @T1 AND @T2) )
GROUP BY dateadd(day, datediff(day, 0, A.PTARIH), 0),U.ADI,S.URUNKODU  
ORDER BY 1 ASC,3 DESC
 