Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/10/2013, 15:14
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: Balance comprobacion

podria ser algo asi

Código SQL:
Ver original
  1. SELECT cuenta,SUM(saldo) FROM cuentas AS t1
  2. LEFT JOIN saldos AS t2 ON (t1.cuenta=t2.cuenta)
  3. GROUP BY cuenta

saludos!
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me