Hola Nelly,
Pues ya he hecho pruebas con tu sentencia SQL y no me da los valores adecuados, hice una modificación y quedo así
Código SQL
[-]
select ca.cve_casilla, ca.municipio,
(select count(rep_casilla) from casilleros
where rep_casilla='PROPIETARIO 1' and cve_casilla = ca.cve_casilla group by rep_casilla) as Propietarios,
(select count(rep_casilla)from casilleros
where rep_casilla='SUPLENTE' and cve_casilla = ca.cve_casilla group by rep_casilla) as Suplentes
from casillas ca
where ca.fecha_eleccion = '20.05.2006 10:00:00'
group by ca.cve_casilla, ca.municipio
No use el inner join y me funciona bien.
Otra cosa que veo es que fecha_eleccion es un campo TIMESTAMP por lo que necesitas forzosamente incluir la hora exacta que tienes en tu base de datos, la otra es que hagas un between, algo así
Código SQL
[-]
where ca.fecha_eleccion between '20.05.2006' and '21.05.2006'
Salud OS.