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

Question: What was the average rank for south africa when they had more than 8 silver medals?
SQL: SELECT AVG("rank") FROM "medal_table" WHERE "nation"='south africa' AND "silver">8;

Question: What is the average number of gold medals the netherlands got when they had more than 4 bronze medals?
SQL: SELECT AVG("gold") FROM "medal_table" WHERE "nation"='netherlands' AND "bronze">4;

Question: What is the sum of the gold medals for the nation of Great britain who had more than 8 silvers and a total of less than 61 medals?
SQL: SELECT SUM("gold") FROM "medal_table" WHERE "silver">8 AND "nation"='great britain' AND "total"<61;

Question: What is the highest number of bronze medals that israel acheived when they got less than 3 silver medals?
SQL: SELECT MAX("bronze") FROM "medal_table" WHERE "nation"='israel' AND "silver"<3;

Question: What is the total number of gold medals when the team got 2 bronze and more than 5 silver medals?
SQL: SELECT COUNT("gold") FROM "medal_table" WHERE "bronze"=2 AND "silver">5;