select pob.nombre,
(select count(*)
from persona
where
poblacion = dat.municipio and
situacion in (3, 4)) cantidad_personas,
(select sum(censo)
from mesas
where
municipio = dat.municipio) censo_electoral
from datloc dat, junta jun, poblacion pob
where
dat.municipio = jun.municipio and
jun.municipio = pob.codigo and
dat.municipio = 14921