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

Question: What is the average Gold, when Nation is Hungary, and when Bronze is greater than 1?
SQL: SELECT AVG("gold") FROM "medal_table" WHERE "nation"='hungary' AND "bronze">1;

Question: What is the average Total, when Nation is Soviet Union, and when Gold is greater than 9?
SQL: SELECT AVG("total") FROM "medal_table" WHERE "nation"='soviet union' AND "gold">9;

Question: What is the total number of Bronze, when Silver is greater than 0, when Gold is greater than 3, and when Rank is 1?
SQL: SELECT COUNT("bronze") FROM "medal_table" WHERE "silver">0 AND "gold">3 AND "rank"='1';

Question: What is the highest Bronze, when Total is less than 3, and when Silver is less than 0?
SQL: SELECT MAX("bronze") FROM "medal_table" WHERE "total"<3 AND "silver"<0;

Question: What is the average Total, when Silver is greater than 4, and when Gold is greater than 16?
SQL: SELECT AVG("total") FROM "medal_table" WHERE "silver">4 AND "gold">16;

Question: What is the sum of Silver, when Total is less than 1?
SQL: SELECT SUM("silver") FROM "medal_table" WHERE "total"<1;