CREATE TABLE "medal_table" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);

Question: What is the most gold medals a team with less than 2 silvers, more than 7 total medals, and less than 8 bronze medals has?
SQL: SELECT MAX("gold") FROM "medal_table" WHERE "silver"<2 AND "total">7 AND "bronze"<8;

Question: What is the number of bronze that Scotland, which has less than 7 total medals, has?
SQL: SELECT SUM("bronze") FROM "medal_table" WHERE "nation"='scotland' AND "total"<7;

Question: What is the average silver medals a team that has 1 gold and more than 5 bronze has?
SQL: SELECT AVG("silver") FROM "medal_table" WHERE "gold"=1 AND "bronze">5;

Question: What is the total number of bronze a team with more than 0 silver, a total of 7 medals, and less than 1 gold medal has?
SQL: SELECT COUNT("bronze") FROM "medal_table" WHERE "silver">0 AND "total"=7 AND "gold"<1;

Question: What is the highest rank a team with 1 silver and less than 5 bronze medals has?
SQL: SELECT MAX("rank") FROM "medal_table" WHERE "silver"=1 AND "bronze"<5;