Ver Mensaje Individual
  #7  
Antiguo 30-11-2015
orodriguezca orodriguezca is offline
Miembro
 
Registrado: ene 2009
Posts: 221
Reputación: 18
orodriguezca Va por buen camino
Prueba esto:

Código SQL [-]
with subconsulta as (
SELECT C.Id_cliente,Nombre,Iden,Cupo,COUNT(*) as Tclient FROM ab_sucursal S 
INNER JOIN ab_cliente C ON S.Id_cliente=C.Id_cliente
WHERE S.Id_user= :Id_user_B GROUP BY Iden)
select count(*)
from subconsulta

o también esto

Código SQL [-]
select count(*)
from (SELECT C.Id_cliente,Nombre,Iden,Cupo,COUNT(*) as Tclient 
         FROM ab_sucursal S 
         INNER JOIN ab_cliente C ON S.Id_cliente=C.Id_cliente
         WHERE S.Id_user= :Id_user_B GROUP BY Iden) subconsulta
Responder Con Cita