CREATE TABLE "topscorers_in_order_of_league_goals" (
  "player" text,
  "club" text,
  "league" real,
  "fa_cup" real,
  "fa_trophy" real,
  "league_cup" real,
  "total" real
);

Question: What is the total number of FA trophies of player Neil Grayson, who has more than 2 FA cups and a league greater than 17?
SQL: SELECT COUNT("fa_trophy") FROM "topscorers_in_order_of_league_goals" WHERE "fa_cup">2 AND "player"='neil grayson' AND "league">17;

Question: What is the sum of FA cups of club Stalybridge Celtic, which has more than 0 FA trophies and a total less than 20?
SQL: SELECT SUM("fa_cup") FROM "topscorers_in_order_of_league_goals" WHERE "fa_trophy">0 AND "club"='stalybridge celtic' AND "total"<20;

Question: What is the total of player Martin Randall, who has more than 1 League Cups and a league less than 18?
SQL: SELECT "total" FROM "topscorers_in_order_of_league_goals" WHERE "league_cup">1 AND "league"<18 AND "player"='martin randall';

Question: What is the lowest number of FA cups of player Andy Milner, who has less than 4 FA trophies and more than 0 league cups?
SQL: SELECT MIN("fa_cup") FROM "topscorers_in_order_of_league_goals" WHERE "fa_trophy"<4 AND "league_cup">0 AND "player"='andy milner';

Question: What is the average total of halifax town club, which has a league less than 30 and more than 3 FA cups?
SQL: SELECT AVG("total") FROM "topscorers_in_order_of_league_goals" WHERE "club"='halifax town' AND "league"<30 AND "fa_cup">3;