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

Question: What is the average total number of medals for a nation with 2 silver medals and a rank larger than 7?
SQL: SELECT AVG("total") FROM "medal_table" WHERE "silver"=2 AND "rank">7;

Question: What is the lowest rank of Ukraine with fewer than 14 silver medals, fewer than 3 bronze medals, and a total of 4 medals?
SQL: SELECT MIN("rank") FROM "medal_table" WHERE "silver"<14 AND "bronze"<3 AND "total"=4 AND "nation"='ukraine';

Question: What is the total of bronze medals from nations with more than 16 total medals and ranks larger than 3?
SQL: SELECT COUNT("bronze") FROM "medal_table" WHERE "total"=16 AND "rank">3;

Question: What is the total number of bronze medals with a total of 4 medals and 1 gold medal?
SQL: SELECT COUNT("bronze") FROM "medal_table" WHERE "total"=4 AND "gold"=1;