select plen.idccodso,
(coalesce(plen.sccoapor,0) + coalesce(plen.sccopram,0) + coalesce(plen.sccoprin,0) + coalesce(plen.sccocred,0) + coalesce(plen.sccomocr,0) +
coalesce(plen.sccoprmo,0) + coalesce(plen.sccofose,0) + coalesce(plen.sccoacti,0) + coalesce(plen.sccomult,0) + coalesce(plen.sccomant,0)) AS total_enviado,
(coalesce(plef.sccoapor,0) + coalesce(plef.sccopram,0) + coalesce(plef.sccoprin,0) + coalesce(plef.sccocred,0) + coalesce(plef.sccomocr,0) + coalesce(plef.sccoprmo,0) +
coalesce(plef.sccofose,0) + coalesce(plef.sccoacti,0) + coalesce(plef.sccomult,0) + coalesce(plef.sccomant,0)) AS total_efectuado
from scoplaen plen left outer join scoplani plef using(idccodso)
where plen.sccdfech BETWEEN '01/01/2006' and '31/01/2006' and
plef.sccdfech BETWEEN '01/01/2006' and '31/01/2006'