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

Question: What is the sum of total with a Rank larger than 12, and a Gold larger than 4?
SQL: SELECT COUNT("total") FROM "medal_count" WHERE "rank">12 AND "gold">4;

Question: What is the smallest bronze with a Rank of 12, and a Silver smaller than 2?
SQL: SELECT MIN("bronze") FROM "medal_count" WHERE "rank"=12 AND "silver"<2;

Question: What is the smallest bronze with a Silver smaller than 2, and a Gold of 1, and a Nation of western isles, and a Total larger than 6?
SQL: SELECT MIN("bronze") FROM "medal_count" WHERE "silver"<2 AND "gold"=1 AND "nation"='western isles' AND "total">6;

Question: What is the average bronze with a total of 15 and less than 2 gold?
SQL: SELECT AVG("bronze") FROM "medal_count" WHERE "total"=15 AND "gold"<2;

Question: What is the total rank with a Nation of gotland, and a Gold larger than 23?
SQL: SELECT COUNT("rank") FROM "medal_count" WHERE "nation"='gotland' AND "gold">23;