SQL server 函数答:--建表create table sale(日期 date,单号 varchar(10),商品 Varchar(10),数量 int)--测试数据insert into sale values('2015-01-01','A0000','电脑',2)insert into sale values('2015-01-02','A0001','电脑',10)insert into sale values('2015-01-03','A0002','电脑',20)insert ...