CREATE TABLE "most_derby_appearances" (
  "competition" text,
  "total_matches" real,
  "cardiff_win" real,
  "draw" real,
  "swansea_win" real
);

Question: How many average total matches have a swansea win less than 3, fa cup as the competition, with a draw less than 0?
SQL: SELECT AVG("total_matches") FROM "most_derby_appearances" WHERE "swansea_win"<3 AND "competition"='fa cup' AND "draw"<0;

Question: How many cardiff wins have a draw greater than 27?
SQL: SELECT COUNT("cardiff_win") FROM "most_derby_appearances" WHERE "draw">27;

Question: How many average total matches have league cup as the competition, with a draw greater than 0?
SQL: SELECT AVG("total_matches") FROM "most_derby_appearances" WHERE "competition"='league cup' AND "draw">0;