我需要从涵盖 7 个月的两列中返回每日总和,但我正在尝试这样做,但这太耗时了。有没有一种方法可以按顺序返回这些,一次递增一天?
select SUM(TotalBet)SALES, SUM(TotalWin)PRIZES from play nolock where CurrentDate between '1/1/2013 07:00:00' and '1/2/2013 7:00:00'
select SUM(TotalBet)SALES, SUM(TotalWin)PRIZES from play nolock where CurrentDate between '1/2/2013 07:00:00' and '1/3/2013 7:00:00'
select SUM(TotalBet)SALES, SUM(TotalWin)PRIZES from play nolock where CurrentDate between '1/3/2013 07:00:00' and '1/4/2013 7:00:00'
select SUM(TotalBet)SALES, SUM(totalbet)PRIZES from play nolock where CurrentDate between '1/4/2013 07:00:00' and '1/5/2013 7:00:00'
select SUM(TotalBet)SALES, SUM(TotalWin)PRIZES from play nolock where CurrentDate between '1/5/2013 07:00:00' and '1/6/2013 7:00:00'
select SUM(TotalBet)SALES, SUM(TotalWin)PRIZES from play nolock where CurrentDate between '1/6/2013 07:00:00' and '1/7/2013 7:00:00'