What is the rank with a higher than 2 total, 21 gold and more than 12 bronze?
CREATE TABLE "medal_table_by_country" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
SELECT AVG("rank") FROM "medal_table_by_country" WHERE "total">2 AND "gold"=21 AND "bronze">12;