create table tb(id varchar(9),fsrq smalldatetime,fscs int)
insert tb(id,fsrq,fscs)
select '01','20070901','1' union all
select '02','20070901','1' union all
select '03','20070901','1' union all
select '01','20070902','1' union all
select '02','20070902','3' union all
select '01','20070903','1' union all
select '01','20070904','1' union all
select '02','20070904','1' union all
select '03','20070904','1'
go
insert tb(id,fsrq,fscs)
select '01','20070901','1' union all
select '02','20070901','1' union all
select '03','20070901','1' union all
select '01','20070902','1' union all
select '02','20070902','3' union all
select '01','20070903','1' union all
select '01','20070904','1' union all
select '02','20070904','1' union all
select '03','20070904','1'
go