Ver Mensaje Individual
  #3 (permalink)  
Antiguo 04/05/2018, 07:43
Avatar de Libras
Libras
Colaborador
 
Fecha de Ingreso: agosto-2006
Ubicación: En la hermosa perla de occidente
Mensajes: 7.412
Antigüedad: 18 años, 6 meses
Puntos: 774
Respuesta: Como sumar carreras en beisbol

NO se podria hacer con un case:


Código MySQL:
Ver original
  1. case when  id_team_homeclub  = '1' then sum(carreras_homeclub) end as homeclub,
  2. case when  id_team_visitante = '1'  = '1' then sum(carreras_visitante) end as visitante
  3. from `jornadas`

ahora cual es el campo que une equipos con jornadas?
__________________
What does an execution plan say to t-sql query? Go f**k yourself, if you are not happy with me