Table: ahac_1897
Columns: team
games_played
wins
losses
ties
goals_for
goals_against

Question: How many losses did the team with 22 goals for andmore than 8 games played have?
SQL: SELECT COUNT("losses") FROM ahac_1897 WHERE "goals_for" = 22 AND "games_played" > 8

Question: For teams with fewer than 5 wins, goals against over 37, and fewer than 8 games played, what is the average number of ties?
SQL: SELECT AVG("ties") FROM ahac_1897 WHERE "wins" < 5 AND "goals_against" > 37 AND "games_played" < 8

Question: For teams with 7 wins, what is the number of goals against?
SQL: SELECT "goals_against" FROM ahac_1897 WHERE "wins" = 7

Question: For teams with more than 0 ties and goals against of 37, how many wins were tallied?
SQL: SELECT MAX("wins") FROM ahac_1897 WHERE "goals_against" = 37 AND "ties" > 0