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

Question: How many totals have 1 gold and a rank smaller than 2?
SQL: SELECT COUNT("total") FROM "medals_table" WHERE "gold"=1 AND "rank"<2;

Question: How much gold did South Korea get?
SQL: SELECT SUM("gold") FROM "medals_table" WHERE "nation"='south korea';