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

Question: What is the total rank for New Zealand, when less than 1 bronze medals were won?
SQL: SELECT SUM("rank") FROM "medal_table_by_country" WHERE "nation"='new zealand' AND "bronze"<1;

Question: What is the sum of sliver medals when there were 2 gold medals, less than 15 total medals, and the rank is greater than 5?
SQL: SELECT SUM("silver") FROM "medal_table_by_country" WHERE "gold"=2 AND "total"<15 AND "rank">5;

Question: What is the total rank for the Netherlands when more than 2 silver medals were won?
SQL: SELECT COUNT("rank") FROM "medal_table_by_country" WHERE "nation"='netherlands' AND "silver">2;

Question: What is the total medal count when there are more than 1 gold and more than 2 silver medals won and the rank is less than 1?
SQL: SELECT "total" FROM "medal_table_by_country" WHERE "gold">1 AND "silver">2 AND "rank"<2;

Question: What is the average medal total when the rank is less than 5 and less than 7 bronze medals were won?
SQL: SELECT AVG("total") FROM "medal_table_by_country" WHERE "rank"<5 AND "bronze"<7;