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

Question: How many gold medals did Brazil win with a total of more than 55 medals?
SQL: SELECT AVG("gold") FROM "medal_table_by_country" WHERE "nation"='brazil' AND "total">55;

Question: How many teams won more than 2 silver medals and fewer than 2 Bronze medals?
SQL: SELECT COUNT("rank") FROM "medal_table_by_country" WHERE "silver">2 AND "bronze"<2;

Question: What is the fewest gold medals won by Greece?
SQL: SELECT MIN("gold") FROM "medal_table_by_country" WHERE "nation"='greece';

Question: What is the lowest rank of the United States, with fewer than 4 bronze medals?
SQL: SELECT MIN("rank") FROM "medal_table_by_country" WHERE "nation"='united states' AND "bronze"<4;

Question: What is the highest number of gold medals won by a team that won fewer than 2 silver and fewer than 4 bronze medals?
SQL: SELECT MAX("gold") FROM "medal_table_by_country" WHERE "silver"<2 AND "bronze"<4;