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

Question: Which nation has a bronze greater than 0, a gold greater than 0, a silver greater than 0, and 5 as the rank?
SQL: SELECT "nation" FROM "medal_table" WHERE "bronze">0 AND "gold">0 AND "silver">0 AND "rank"='5';

Question: What nation has 1 as the gold and 2 as the total?
SQL: SELECT "nation" FROM "medal_table" WHERE "gold"=1 AND "total"=2;

Question: What rank has 0 as the bronze, and a total less than 3, with north korea as the nation?
SQL: SELECT "rank" FROM "medal_table" WHERE "bronze"=0 AND "total"<3 AND "nation"='north korea';

Question: How many golds have a bronze less than 1, and a silver less than 1?
SQL: SELECT COUNT("gold") FROM "medal_table" WHERE "bronze"<1 AND "silver"<1;

Question: What average total has cuba as the nation, and a bronze greater than 1?
SQL: SELECT AVG("total") FROM "medal_table" WHERE "nation"='cuba' AND "bronze">1;

Question: What is the highest total that has a bronze greater than 1, a gold greater than 1, with a silver less than 4?
SQL: SELECT MAX("total") FROM "medal_table" WHERE "bronze">1 AND "gold">1 AND "silver"<4;