select sum(num) as num,sum(totalpage) as totalpage,
editor from (
from t_volumerecord c
inner join (
select a.volumeid,count(b.id) as num,max(b.pagenum2) as totalpage
from t_volumerecord a inner join t_volumeitem b
on a.volumeid = b.volumeid
group by a.volumeid
) d on c.volumeid = d.volumeid where 1=1 and c.editor='***'
and cast(f.edittime as datetime) >='2007-05-01'
and cast(f.edittime as datetime) <'2008-03-01'
) e group by editor