Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/12/2014, 12:20
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 17 años, 8 meses
Puntos: 774
Respuesta: Tareas pendientes agrupadas por fecha.

Código SQL:
Ver original
  1. SELECT SUM(pendienteresolutor) AS total, fecha FROM(
  2. SELECT COUNT(DISTINCT id_operacion) AS pendienteResolutor ,
  3.        TO_CHAR(FECHA_INICIO,'DD/MM/YYYY') AS fecha
  4. FROM movimientos_vista
  5. WHERE resolutor = 'Administrador' AND FECHA_FIN IS NULL
  6. GROUP BY TO_CHAR(FECHA_INICIO,'DD/MM/YYYY')
  7. ORDER BY to_date(TO_CHAR(FECHA_INICIO,'DD/MM/YYYY'),'DD/MM/YYYY')
  8. ) AS t1 GROUP BY fecha
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me