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

Question: What is the sum of Total, when Rank is 8, and when Bronze is less than 1?
SQL: SELECT SUM("total") FROM "medal_table" WHERE "rank"='8' AND "bronze"<1;

Question: What is the lowest Bronze, when Gold is less than 0?
SQL: SELECT MIN("bronze") FROM "medal_table" WHERE "gold"<0;

Question: What is the average Bronze, when Total is 7, and when Silver is greater than 1?
SQL: SELECT AVG("bronze") FROM "medal_table" WHERE "total"=7 AND "silver">1;

Question: What is the sum of Total, when Silver is 0, and when Gold is 1?
SQL: SELECT SUM("total") FROM "medal_table" WHERE "silver"=0 AND "gold"=1;

Question: What is the highest Total, when Gold is 1, when Nation is Hungary, and when Bronze is less than 0?
SQL: SELECT MAX("total") FROM "medal_table" WHERE "gold"=1 AND "nation"='hungary' AND "bronze"<0;