sql statement is as follows
SELECT sum(case when CONVERT(varchar(100), b.BillDate, 112) >= 20180101 AND CONVERT(varchar(100), b.BillDate, 112) < 20180126 then b.totalmoney else 0 end)AS "",
sum(case when CONVERT(varchar(100), b.BillDate, 112) >= 20180126 AND CONVERT(varchar(100), b.BillDate, 112) < 20180226 then b.totalmoney else 0 end)AS "",
sum(case when CONVERT(varchar(100), b.BillDate, 112) >= 20180226 AND CONVERT(varchar(100), b.BillDate, 112) < 20180326 then b.totalmoney else 0 end)AS "",
sum(case when CONVERT(varchar(100), b.BillDate, 112) >= 20180326 AND CONVERT(varchar(100), b.BillDate, 112) < 20180426 then b.totalmoney else 0 end)AS "",
sum(case when CONVERT(varchar(100), b.BillDate, 112) >= 20180426 AND CONVERT(varchar(100), b.BillDate, 112) < 20180526 then b.totalmoney else 0 end)AS "",
sum(case when CONVERT(varchar(100), b.BillDate, 112) >= 20180526 AND CONVERT(varchar(100), b.BillDate, 112) < 20180626 then b.totalmoney else 0 end)AS "",
sum(case when CONVERT(varchar(100), b.BillDate, 112) >= 20180626 AND CONVERT(varchar(100), b.BillDate, 112) < 20180726 then b.totalmoney else 0 end)AS "",
sum(case when CONVERT(varchar(100), b.BillDate, 112) >= 20180726 AND CONVERT(varchar(100), b.BillDate, 112) < 20180826 then b.totalmoney else 0 end)AS "",
sum(case when CONVERT(varchar(100), b.BillDate, 112) >= 20180826 AND CONVERT(varchar(100), b.BillDate, 112) < 20180926 then b.totalmoney else 0 end)AS "",
sum(case when CONVERT(varchar(100), b.BillDate, 112) >= 20180926 AND CONVERT(varchar(100), b.BillDate, 112) < 20181026 then b.totalmoney else 0 end)AS "",
sum(case when CONVERT(varchar(100), b.BillDate, 112) >= 20181026 AND CONVERT(varchar(100), b.BillDate, 112) < 20181126 then b.totalmoney else 0 end)AS "",
sum(case when CONVERT(varchar(100), b.BillDate, 112) >= 20181126 AND CONVERT(varchar(100), b.BillDate, 112) < 20181231 then b.totalmoney else 0 end)AS ""
FROM BillIndex as b WHERE
datepart(year,b.BillDate)="2018"
AND BillType = 11
AND ifcheck = "t"
AND RedWord = 0
AND Stypeid = "00001";