From: | raul andrez gutierrez alejo <raulandrez(at)gmail(dot)com> |
---|---|
To: | |
Cc: | POSTGRES <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | Re: Estadistica por fechas |
Date: | 2014-12-03 22:27:37 |
Message-ID: | CAHQFj70MK7bZfnDghSSoUwfkDeU0F-znsL1vnJ0_=hSFCjb22A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
hola.
creo que seria así:
SELECT *
FROM tabla
WHERE fecha_ingreso IS NOT NULL
AND fecha_termino IS NULL.
El 3 de diciembre de 2014, 17:02, Gilberto Castillo <
gilberto(dot)castillo(at)etecsa(dot)cu> escribió:
>
>
> > Hola compañeros, tengo una consulta que me tiene trabado, tengo una tabla
> > de tickets:
> >
> > id numero fecha_ingreso fecha_termino
> >
> > La consulta que me piden es cuantos tickets estuvieron activos (no fueron
> > finalizados) al final de cada mes.
>
> Supongo que todo el que tenga fecha_termino en null o algo así... aun esta
> abierto.
>
> ¿Un tickets, debe ser obligatoriamente cerrado en el mismo mes?
>
> Saludos,
> Gilberto Castillo
> La Habana, Cuba
>
> ---
> This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE
> running at host imx3.etecsa.cu
> Visit our web-site: <http://www.kaspersky.com>, <http://www.viruslist.com>
>
> -
> Enviado a la lista de correo pgsql-es-ayuda (pgsql-es-ayuda(at)postgresql(dot)org
> )
> Para cambiar tu suscripción:
> http://www.postgresql.org/mailpref/pgsql-es-ayuda
>
>
--
Raul Andres Gutierrez Alejo
From | Date | Subject | |
---|---|---|---|
Next Message | Aland Laines | 2014-12-03 22:31:15 | Re: Estadistica por fechas |
Previous Message | Gilberto Castillo | 2014-12-03 22:02:26 | Re: Estadistica por fechas |