sorry, here is the data
CREATE TABLE sample(id int identity(1,1), s_date datetime, amount int)
insert into sample
select '20100101', 1
union all
select '20100102', 1
union all
select '20100103', 1
union all
select '20100104', 1
union all
select '20100111', 1
union all
select...