SELECT DATEADD(day, DATEDIFF(day, 0, S.SIPARISTARIHI), 0) AS Tarih, D.ADI AS Departman, U.KDV,
 ROUND(SUM((S.TUTAR)-((S.TUTAR) - (((S.TUTAR) * 100)/(100+U.KDV)))),2) AS Matrah,
 ROUND(SUM(((S.TUTAR) - (((S.TUTAR) * 100)/(100+U.KDV)))),2) AS KDVTutar,
 ROUND(SUM(S.TUTAR),2) AS SatTutar,
 U.GGRUP AS GGrup,G.ADI AS GRUPADI
FROM A_Adisyon AS A LEFT JOIN
      DEPARTMAN AS D ON D.KODU = A.DEPKODU LEFT JOIN
      A_AdsSatir AS S ON S.FISID = A.ID LEFT JOIN
      URUN AS U ON U.KODU = S.URUNKODU LEFT JOIN
      GELIRGRUP AS G ON G.KODU = U.GGRUP
--WHERE DATEDIFF(DAY,S.SIPARISTARIHI,:T1)=0
GROUP BY DATEADD(day, DATEDIFF(day, 0, S.SIPARISTARIHI), 0), D.ADI, U.KDV, U.GGRUP,G.ADI
ORDER BY Tarih,Departman