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

Question: How many goals were scored by the team that played less than 38 games, and had points of 47+9?
SQL: SELECT MAX("goals_for") FROM segunda_division_stats_6 WHERE "points" = '47+9' AND "played" < 38

Question: What is the average wins of the team with more than 13 draws, a goal difference of -14, and losses less than 14?
SQL: SELECT AVG("wins") FROM segunda_division_stats_6 WHERE "draws" > 13 AND "goal_difference" = -14 AND "losses" < 14

Question: In the club of Real Oviedo, what were the points of the competitor with a goal difference less than 38, and 12 wins?
SQL: SELECT "points" FROM segunda_division_stats_6 WHERE "goal_difference" < 38 AND "wins" = 12 AND "club" = 'real oviedo'