
22/03/2012, 09:27
|
| | Fecha de Ingreso: enero-2012
Mensajes: 158
Antigüedad: 13 años Puntos: 1 | |
Respuesta: Consulta Mucchas gracias llegue a resolverlo era asi
SELECT IF( SUM( IF( gratificacion.comisiones >0, 1, 0 ) ) >=3, SUM( gratificacion.comisiones ) , NULL ) AS COMISIONES, IF( SUM( IF( gratificacion.asignaciones >0, 1, 0 ) ) >=3, SUM( gratificacion.asignaciones ) , NULL ) AS ASIGNACIONES, IF( SUM( IF( gratificacion.bonificaciones >0, 1, 0 ) ) >=3, SUM( gratificacion.bonificaciones ) , NULL ) AS BONIFICACIONES
FROM gratificacion |