
09/10/2014, 09:14
|
 | | | Fecha de Ingreso: octubre-2014
Mensajes: 3
Antigüedad: 10 años, 4 meses Puntos: 0 | |
--> Duda con un subquery para un registro final hola a todos,
haber si me pueden ayudar, en algo tal vez simple.
No he logrado representar un dato en un solo query.
query principal
select IN_DIAS_TRAB from TBL_ASISTENCIA
where ID_TRABAJADOR in (388,393)
group by IN_DIAS_TRAB
resultado:
IN_DIAS_TRAB
9
10
11
15
20
pero necesito reflejar el count de los 5 registros.
resultado:
5
Seria como meter el resultado en un COUNT
select count(select IN_DIAS_TRAB from TBL_ASISTENCIA
where ID_TRABAJADOR in (388,393)
group by IN_DIAS_TRAB)
pero no me resulta, y no quiero usar una tabla temporal.
he buscado ejemplos pero no halla nada asi.
gracias |