What is the highest total number of medals for a team ranked smaller than 1 and had 20 gold medals?
CREATE TABLE "medal_table" (
  "rank" real,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
SELECT MAX("total") FROM "medal_table" WHERE "gold"=20 AND "rank"<1;