First, I know that's a terribly vague title -- my knowledge of SQL is so weak that I don't really know the particulars of what I'm asking, so please bear with me.
I have a table that looks like this:
+--------+-----------+----------+--------+--------+
| gameid | team1 | team2 | score1 | score2 |
+--------+-----------+----------+--------+--------+
| 1 | New York | Boston | 1 | 2 |
| 2 | New York | Boston | 2 | 0 |
| 3 | Baltimore | New York | 3 | 1 |
| 4 | Boston | New York | 3 | 0 |
+--------+-----------+----------+--------+--------+
Where gameid is a unique identifier, score1 corresponds to the score for team1, etc.
What I need is a query that will produce a summation of wins and losses for a given team against all opponents. Using New York for example, the query would create the following table:
+-----------+------+--------+
| team | wins | losses |
+-----------+------+--------+
| Baltimore | 0 | 1 |
| Boston | 1 | 2 |
+-----------+------+--------+