view entry
Source code
1 2
|
SELECT wins.TeamNum, wins.TeamAbbrev, wincount AS 'Home Wins', losscount AS 'Home Losses' FROM (
select Team.TeamNum Team.TeamAbbrev, count( Game2.HScore ) as wincount from Game2 INNER JOIN Team ON Team.TeamNum = HTeam where Game2.Season='2002' and Game2.HScore > Game2.AScore group by HTeam as HWins) AS wins INNER JOIN (select Team.TeamNum, Team.TeamAbbrev, count( Game2.HScore ) as losscount from Game2,Team where Game2.Season='2002' and Game2.HScore < Game2.AScore and Team.TeamNum = HTeam group by HTeam as HLosses) AS losses ON losses.TeamNum = wins.TeamNum
|
|
|
|