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

Question: What is the sum of the gold medals of the nation with 4 silvers and more than 6 total medals?
SQL: SELECT SUM("gold") FROM "medals_table" WHERE "silver"=4 AND "total">6;

Question: What is the highest number of bronze medals of west germany, which has more than 0 golds?
SQL: SELECT MAX("bronze") FROM "medals_table" WHERE "nation"='west germany' AND "gold">0;

Question: What is the average total medals of the soviet union, which has more than 2 bronze and more than 0 silver medals?
SQL: SELECT AVG("total") FROM "medals_table" WHERE "bronze">2 AND "silver">0 AND "nation"='soviet union';