CREATE TABLE "final_table" (
  "position" real,
  "club" text,
  "played" real,
  "points" text,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "goal_difference" real
);

Question: Which position has 50+12 points and fewer than 10 draws?
SQL: SELECT MAX("position") FROM "final_table" 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 "final_table" 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 "final_table" 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 "final_table" WHERE "goals_for"<43 AND "draws">9 AND "position">17 AND "points"='30-8';