What is the average total medals Egypt, who has less than 2 gold, has?
CREATE TABLE "medal_table" (
  "rank" text,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
SELECT AVG("total") FROM "medal_table" WHERE "nation"='egypt' AND "gold"<2;