SELECT dateadd(day, datediff(day, 0, H.TARIH), 0) 'Tarih',S.STOKADI 'StokAdi',H.ISLEM 'Islem',
SUM(H.ADET) 'Adet',SUM(H.TUTAR) 'Tutar'
FROM STOKHAREKET  H
JOIN STOK     S ON S.STOKKODU=H.STOKKODU
--WHERE ( (@TUMLISTE = 1) OR (A.TARIH BETWEEN @T1 AND @T2) )
GROUP BY dateadd(day, datediff(day, 0, H.TARIH), 0),S.STOKADI,H.ISLEM
ORDER BY 1 ASC,3 DESC
 