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

Question: Japan (JPN) with a total of less than 5, has what average gold medals?
SQL: SELECT AVG("gold") FROM "medal_table" WHERE "nation"='japan (jpn)' AND "total"<5;

Question: What is the average bronze medal when gold is greater than 0, and there is less than 0 silver medals?
SQL: SELECT AVG("bronze") FROM "medal_table" WHERE "gold">0 AND "silver"<0;

Question: What is the sum of bronze medals when the rank is greater than 2, and less than 2 total medals with silver medals being more than 0?
SQL: SELECT COUNT("bronze") FROM "medal_table" WHERE "rank">2 AND "total"<2 AND "silver">0;

Question: With a greater than 4 rank, and the silver medal greater than 0, and the bronze medal less than 1, what is the average total?
SQL: SELECT AVG("total") FROM "medal_table" WHERE "rank">4 AND "silver">0 AND "bronze"<1;

Question: What is the fewest gold medals when the bronze medals is greater than 5?
SQL: SELECT MIN("gold") FROM "medal_table" WHERE "bronze">5;