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

Question: Silver larger than 0, and a Total smaller than 3, and a Nation of bulgaria, and a Bronze smaller than 0 had what sum of gold?
SQL: SELECT SUM("gold") FROM "medal_table" WHERE "silver">0 AND "total"<3 AND "nation"='bulgaria' AND "bronze"<0;

Question: Nation of total has what sum of gold?
SQL: SELECT SUM("gold") FROM "medal_table" WHERE "nation"='total';

Question: Total of 3, and a Gold larger than 0, and a Nation of belarus, and a Silver larger than 2 has what sum of bronze?
SQL: SELECT SUM("bronze") FROM "medal_table" WHERE "total"=3 AND "gold">0 AND "nation"='belarus' AND "silver">2;

Question: Bronze of 22 has what average silver?
SQL: SELECT AVG("silver") FROM "medal_table" WHERE "bronze"=22;