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

Question: What is silver when gold is 1 and the rank is less than 3 for japan?
SQL: SELECT "silver" FROM "medals_table" WHERE "gold"=1 AND "rank"<3 AND "nation"='japan';

Question: What is the rank for the total less than 1?
SQL: SELECT AVG("rank") FROM "medals_table" WHERE "total"<1;

Question: What is the gold when the total is less than 2, and rank is 3 and Canada is the nation?
SQL: SELECT "gold" FROM "medals_table" WHERE "total"<2 AND "rank"=3 AND "nation"='canada';