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

Question: How many gold medals for Bulgaria (BUL) with 2 silvers and a less than 18 rank?
SQL: SELECT SUM("gold") FROM "men" WHERE "silver"=2 AND "nation"='bulgaria (bul)' AND "rank"<18;

Question: What's the most bronze medals for Great Britain (GBR) with more than 1 silver and ranked more than 6?
SQL: SELECT MAX("bronze") FROM "men" WHERE "rank">6 AND "nation"='great britain (gbr)' AND "silver">1;

Question: What's the total silver medals having less than 2 gold and 2 bronze?
SQL: SELECT COUNT("silver") FROM "men" WHERE "bronze"=2 AND "gold"<2;