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

Question: Which Gold has a Rank of 7, a Nation of italy, and a Silver smaller than 0?
SQL: SELECT COUNT("gold") FROM "medal_table" WHERE "rank"='7' AND "nation"='italy' AND "silver"<0;

Question: Which Gold has a Total larger than 3, a Rank of total, and a Silver larger than 8?
SQL: SELECT AVG("gold") FROM "medal_table" WHERE "total">3 AND "rank"='total' AND "silver">8;