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

Question: Which position has 50+12 points and fewer than 10 draws?
SQL: SELECT MAX("position") FROM segunda_division_stats_11 WHERE "points" = '50+12' AND "draws" < 10

Question: How many positions have goals of fewer than 40 and more than 38 played?
SQL: SELECT COUNT("position") FROM segunda_division_stats_11 WHERE "goals_for" < 40 AND "played" > 38

Question: How many losses are there in the CD Sabadell club with a goal difference less than -2, and more than 38 played?
SQL: SELECT SUM("losses") FROM segunda_division_stats_11 WHERE "goal_difference" < -2 AND "club" = 'cd sabadell' AND "played" > 38

Question: What are the average number of played with goals of less than 43, more than 9 draws, a higher position than 17 and 30-8 points?
SQL: SELECT AVG("played") FROM segunda_division_stats_11 WHERE "goals_for" < 43 AND "draws" > 9 AND "position" > 17 AND "points" = '30-8'