select num_insc,tipo_rec,count(*) from recursos left outer join inscricoes using(num_insc) where cand_id=0 group by num_insc,tipo_rec