What is the average amount of goals that have a goal difference or 8 and the losses are smaller than 12?
CREATE TABLE "final_table" (
  "position" real,
  "club" text,
  "played" real,
  "wins" real,
  "draws" real,
  "losses" real,
  "goals_for" real,
  "goals_against" real,
  "points" real,
  "goal_difference" real
);
SELECT AVG("goals_for") FROM "final_table" WHERE "goal_difference"=8 AND "losses"<12;