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

Question: What was the highest number of losses for a position less than 6, with more than 11 wins and 36 points, with a played entry of more than 30?
SQL: SELECT MAX("losses") FROM segunda_division_stats_19 WHERE "position" < 6 AND "wins" > 11 AND "points" = 36 AND "played" > 30

Question: What is the total number of wins for the entry that has fewer than 49 goals against, 39 goals for, 9 draws, and fewer than 31 points?
SQL: SELECT COUNT("wins") FROM segunda_division_stats_19 WHERE "goals_against" < 49 AND "draws" = 9 AND "goals_for" = 39 AND "points" < 31

Question: What is the average number of goals for entries with more than 12 losses, more than 10 wins, more than 3 draws, and fewer than 29 points?
SQL: SELECT AVG("goals_for") FROM segunda_division_stats_19 WHERE "losses" > 12 AND "wins" > 10 AND "points" < 29 AND "draws" > 3

Question: What is the highest number of wins for club Cd Orense, with points greater than 36 and more than 4 draws?
SQL: SELECT MAX("wins") FROM segunda_division_stats_19 WHERE "draws" > 4 AND "club" = 'cd orense' AND "points" > 36

Question: What is the total number of played for the entry with a position of less than 1?
SQL: SELECT SUM("played") FROM segunda_division_stats_19 WHERE "position" < 1