Gestão de projetos

SQL - Como detalhar o que os recursos fizeram em um período?

PROJET.FAQ-4798
select p.pessoa
, at.atividade as ocorrencia
, coalesce(at.titulo,' *** APROPRIAÇÃO SEM OCORRÊNCIA ***') as descricao
, to_char(sum(ah.tempo),'9990.99') as tempo
from apropriacao_horas ah
join pessoas p on p.id = ah.pessoa_id
left join atividades at on at.id=ah.atividade_id
where ah.inicio between '2010-10-01' and '2010-10-31'
and p.pessoa like '%'
group by p.pessoa, at.atividade, at.titulo
order by p.pessoa;