CREATE TABLE "medal_table" (
  "rank" text,
  "nation" text,
  "gold" real,
  "silver" real,
  "bronze" real,
  "total" real
);

Question: What is the average total medals Egypt, who has less than 2 gold, has?
SQL: SELECT AVG("total") FROM "medal_table" WHERE "nation"='egypt' AND "gold"<2;

Question: What is the total number of gold medals Egypt, who has less than 0 silver, has?
SQL: SELECT COUNT("gold") FROM "medal_table" WHERE "nation"='egypt' AND "silver"<0;

Question: What is the highest gold a team with less than 3 silver and more than 5 bronze medals has?
SQL: SELECT MAX("gold") FROM "medal_table" WHERE "silver"<3 AND "bronze">5;

Question: What is the rank of the team with 1 bronze and 0 gold medals?
SQL: SELECT "rank" FROM "medal_table" WHERE "bronze"=1 AND "gold"=0;