How many Gold does the Nation in Rank 12 with less than 2 Total medals have?
CREATE TABLE "medal_table" (
  "rank" text,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
SELECT MAX("gold") FROM "medal_table" WHERE "rank"='12' AND "total"<2;