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销售金额
2023-10-23 18:37:10
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销售金额