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

Question: What is the most gold when the rank is 7 and bronze is less than 0?
SQL: SELECT MAX("gold") FROM "medal_table" WHERE "rank"='7' AND "bronze"<0;

Question: what is the most gold when the total is 7?
SQL: SELECT MAX("gold") FROM "medal_table" WHERE "total"=7;

Question: what is the least gold when the rank is 10 and silver is less than 0?
SQL: SELECT MIN("gold") FROM "medal_table" WHERE "rank"='10' AND "silver"<0;

Question: what is the lowest total when the nation is sweden (swe) and silver is less than 0?
SQL: SELECT MIN("total") FROM "medal_table" WHERE "nation"='sweden (swe)' AND "silver"<0;

Question: what is the average total when silver is more than 2, bronze is 12 and gold is less than 12?
SQL: SELECT AVG("total") FROM "medal_table" WHERE "silver">2 AND "bronze"=12 AND "gold"<12;