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

Question: what is the highest rank with a total less than 1?
SQL: SELECT MAX("rank") FROM "medals_table" WHERE "total"<1;

Question: what is the average bronze when gold is 1, the nation is hungary and the rank is less than 3?
SQL: SELECT AVG("bronze") FROM "medals_table" WHERE "gold"=1 AND "nation"='hungary' AND "rank"<3;

Question: How many times was the total more than 1, the nation was east germany and silver was more than 1?
SQL: SELECT COUNT("bronze") FROM "medals_table" WHERE "total">1 AND "nation"='east germany' AND "silver">1;

Question: what is the average rank when the nation is east germany and silver is more than 1?
SQL: SELECT AVG("rank") FROM "medals_table" WHERE "nation"='east germany' AND "silver">1;