How many gold medals does the country ranked higher than 2 with more than 8 bronze have?
CREATE TABLE "medal_table" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
SELECT SUM("gold") FROM "medal_table" WHERE "rank"<2 AND "bronze">8;