你可以先得到这个日期
算出第一周的时间范围
date1-begin date1-end
第二周
date2-begin date2-end
...
select count(日期)as 次数 , 服务类型 from table group by 服务类型
where 日期>date1-begin and 日期 < date1-end
union
select count(日期)as 次数 , 服务类型 from table group by 服务类型
where 日期>date2-begin and 日期 < date2-end
union
...
算出第一周的时间范围
date1-begin date1-end
第二周
date2-begin date2-end
...
select count(日期)as 次数 , 服务类型 from table group by 服务类型
where 日期>date1-begin and 日期 < date1-end
union
select count(日期)as 次数 , 服务类型 from table group by 服务类型
where 日期>date2-begin and 日期 < date2-end
union
...
我的msn是 [email protected]