select id,name ,
sum( case when renwulb='扫地' and DAYOFMONTH(atime)>=1 and DAYOFMONTH(atime)<=7 then 1 else 0 end ),
sum( case when renwulb='擦玻璃' and DAYOFMONTH(atime)>=1 and DAYOFMONTH(atime)<=7 then 1 else 0 end ),
.....各种字段组合
from eee
group by id,name