howto sum columns in one table with different conditions in SQL Posted January 22, 2017 Hello, Can someone help please. I have a table with a player_home, player_away, team_home, team_away, score_home, score_away player_home always has team_home and score_home. player_away always has team_away and score_away Problem is on one row the player 'Rob' can be player_home and the next row he is player_away. What I wanna get out of this table is.. How many times did 'Rob' win a game? How can I query this? I appreciate the help! :-)
howto sum columns in one table with different conditions
in SQL
Posted
Hello,
Can someone help please.
I have a table with a
player_home,
player_away,
team_home,
team_away,
score_home,
score_away
player_home always has team_home and score_home.
player_away always has team_away and score_away
Problem is on one row the player 'Rob' can be player_home and the next row he is player_away.
What I wanna get out of this table is..
How many times did 'Rob' win a game?
How can I query this?
I appreciate the help!
:-)