Table: league_stats_11
Columns: position
club
played
wins
draws
losses
goals_for
goals_against
points
goal_difference

Question: How many wins when points are more than 51, goals against are more than 23 and losses are 5?
SQL: SELECT COUNT("wins") FROM league_stats_11 WHERE "points" > 51 AND "goals_against" > 23 AND "losses" = 5

Question: How many wins when there are more than 19 points, place smaller than 12, and fewer than 30 played?
SQL: SELECT SUM("wins") FROM league_stats_11 WHERE "points" > 19 AND "position" < 12 AND "played" < 30

Question: What is the number played by the team in place greater than 16?
SQL: SELECT AVG("played") FROM league_stats_11 WHERE "position" > 16