Cita:
Iniciado por flaviovich
Asi no te funciona?
Código:
SELECT C.Cuenta, C.Nombre, MAX(G.[Fecha Gestion]) [ULT_FCH_GEST],
MAX(P.[Fecha Pago]) [ULT_FCH_PAGO], MAX(P.Valor) [VALOR_ULT_PAGO]
FROM CLIENTES C
INNER JOIN GESTIONES G ON C.Cuenta=G.Cuenta
INNER JOIN PAGOS P ON C.Cuenta=P.Cuenta
GROUP BY C.Cuenta, C.Nombre
hola, por otras cuestiones habia dejado esto a medias, pero andaba cerca, ahora pruebo tu codigo y voy a ver si lo hago funcionar.....