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

Question: What is the average total with less than 8 bronze, 3 silver, and a Rank smaller than 2?
SQL: SELECT AVG("total") FROM "results" WHERE "bronze"<8 AND "silver"=3 AND "rank"<2;

Question: What is the average Total with a Rank greater than 1, and a Bronze larger than 8?
SQL: SELECT AVG("total") FROM "results" WHERE "rank">1 AND "bronze">8;

Question: What is the smallest silver from Vietnam?
SQL: SELECT MIN("silver") FROM "results" WHERE "nation"='vietnam';

Question: What is the largest silver from Malaysia with a Total smaller than 23?
SQL: SELECT MAX("silver") FROM "results" WHERE "nation"='malaysia' AND "total"<23;

Question: What is the largest bronze with a Rank of 2, and a Gold smaller than 8?
SQL: SELECT MAX("bronze") FROM "results" WHERE "rank"=2 AND "gold"<8;

Question: How many ranks have a Bronze smaller than 8, and a Total smaller than 7, and a Gold smaller than 1?
SQL: SELECT COUNT("rank") FROM "results" WHERE "bronze"<8 AND "total"<7 AND "gold"<1;