CREATE TABLE "record_by_competition" (
  "competition" text,
  "played" real,
  "millwall_wins" real,
  "drawn" real,
  "west_ham_wins" real,
  "millwall_goals" real,
  "west_ham_goals" real
);

Question: How many wins did West Ham get when Millwall had more than 23 goal and 5 wins, and they tied 8 times?
SQL: SELECT "west_ham_wins" FROM "record_by_competition" WHERE "millwall_wins">5 AND "millwall_goals">23 AND "drawn"=8;

Question: What is the least number of wins West Ham got when they tied 27 times?
SQL: SELECT MIN("west_ham_wins") FROM "record_by_competition" WHERE "drawn">27;