Tema: Consulta Sql
Ver Mensaje Individual
  #2  
Antiguo 26-04-2010
cloayza cloayza is offline
Miembro
 
Registrado: may 2003
Ubicación: San Pedro de la Paz, Chile
Posts: 947
Reputación: 25
cloayza Tiene un aura espectacularcloayza Tiene un aura espectacular
Podria ser ...

Código SQL [-]
SELECT DISTINCT Eventos.Evento, Eventos.Fecha,
 (SELECT COUNT(*) From Eventos V Where( V.Hora>'00:00' And V.Hora<='12:00') And V.Evento=Eventos.Evento And V.Fecha=Eventos.Fecha) AS Cuenta_1,
 (SELECT COUNT(*) From Eventos V Where( V.Hora>'12:00') And V.Evento=Eventos.Evento And V.Fecha=Eventos.Fecha) AS Cuenta_2
FROM Eventos

Saludos
Responder Con Cita