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

Question: What is the smallest total for a rank below 4, 0 silver medals, and 2 gold medals?
SQL: SELECT MIN("total") FROM "medal_table" WHERE "rank"<4 AND "silver">0 AND "gold"<2;

Question: How many gold medals on average were earned by Italy when they held the rank of 4?
SQL: SELECT AVG("gold") FROM "medal_table" WHERE "nation"='italy' AND "rank">4;