1.SELECT MONTH(SellTime) as selltime,SUM(TotalPrice) as total FROM Sell WHERE YEAR(SellTime)=CONVERT(varchar(4),getdate(),120)
GROUP BY MONTH(SellTime)
1)SellTime销售时间
2)TotalPrice销售金额
1.SELECT MONTH(SellTime) as selltime,SUM(TotalPrice) as total FROM Sell WHERE YEAR(SellTime)=CONVERT(varchar(4),getdate(),120)
GROUP BY MONTH(SellTime)
1)SellTime销售时间
2)TotalPrice销售金额