How many gold medals for a nation with rank less than 5, more than 0 silvers and a total of 2 medals?
CREATE TABLE "championships_per_nation" (
  "rank" real,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);
SELECT AVG("gold") FROM "championships_per_nation" WHERE "rank"<5 AND "silver">0 AND "total"=2;