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

Question: What is the sum of golds for ranks of 6 and totals over 3?
SQL: SELECT SUM("gold") FROM "medal_table" WHERE "rank"='6' AND "total">3;

Question: What is the average silver for golds over 2, ranks of 1, and bronzes over 0?
SQL: SELECT AVG("silver") FROM "medal_table" WHERE "gold">2 AND "rank"='1' AND "bronze">0;

Question: What is the number of totals that have silvers under 2, bronzes over 0, and golds over 1?
SQL: SELECT COUNT("total") FROM "medal_table" WHERE "silver"<2 AND "bronze">0 AND "gold">1;

Question: What is the total number of golds having a total of 1, bronzes of 0, and from West Germany?
SQL: SELECT COUNT("gold") FROM "medal_table" WHERE "total"=1 AND "bronze"<1 AND "nation"='west germany';

Question: What is the sum of bronzes having silvers over 5 and golds under 20?
SQL: SELECT SUM("bronze") FROM "medal_table" WHERE "silver">5 AND "gold"<20;