Ver Mensaje Individual
  #3 (permalink)  
Antiguo 26/11/2013, 15:25
chocolitos2013
 
Fecha de Ingreso: noviembre-2013
Mensajes: 7
Antigüedad: 10 años, 11 meses
Puntos: 0
Respuesta: Cantidad de dias laborables (join dim_tiempo y tabla de hechos)

Que tal Libras,

intento usar el count(), pero de algun modo no me esta arrojando los datos correctos, mi query hasta ahora es el siguiente:

select count(fecha) as num_registros
from dim_fecha
where
fecha >= ALL(select fecha_creacion from fact) and fecha < ALL (select fecha_cierre from fact).

imagina que los datos en la fact son los siguientes:

| FECHA_CREACION | FECHA_CIERRE |
|2013/08/01 | 2013/08/05 |
|2013/08/02 | 2013/08/08 |
|2013/08/01 | 2013/08/09 |
|etc.. | etc... |

entonces yo quiero ver un resultado como algo asi:

| num_registros |
| 4 |
| 6 |
| 8 |
| etc...|

espero poder explicarme