How many gold did Gabon have when they were ranked no higher than 17, and less than 7 in total?
CREATE TABLE "sporting_events" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
SELECT SUM("gold") FROM "sporting_events" WHERE "total"<7 AND "nation"='gabon' AND "rank"<17;