Acho que pode ser assim select f.matricula, f.nm_funcionario, case when s.data_abertura = '20-06-2007' then count(s.cd_solicitacao) else count(0) end as 'Dia 20 ', case when s.data_abertura = '22-06-2007' then count(s.cd_solicitacao) else count(0) end as 'Dia 22 ', from tb_funcionario f left join tb_solicitacao s on (f.matricula = s.matricula) where s.data_abertura = '20-06-2007' group by f.matricula, f.nm_funcionario