Table: benalla_football_stats_2
Columns: benalla_dfl
wins
losses
draws
byes
against

Question: What's the total losses that has more than 12 wins and 1017 against?
SQL: SELECT COUNT("losses") FROM benalla_football_stats_2 WHERE "against" = 1017 AND "wins" > 12

Question: What's the most wins of Tatong?
SQL: SELECT MAX("wins") FROM benalla_football_stats_2 WHERE "benalla_dfl" = 'tatong'

Question: What's the most number of byes for Longwood having less than 1944 against?
SQL: SELECT MAX("byes") FROM benalla_football_stats_2 WHERE "benalla_dfl" = 'longwood' AND "against" < 1944

Question: What is the smallest number against when the draws are less than 0?
SQL: SELECT MIN("against") FROM benalla_football_stats_2 WHERE "draws" < 0

Question: What are the average byes of Bonnie Doon having more than 16 wins?
SQL: SELECT AVG("byes") FROM benalla_football_stats_2 WHERE "benalla_dfl" = 'bonnie doon' AND "wins" > 16