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

Question: What is the sum of all gold medals for Algeria when total medals is less than 3?
SQL: SELECT SUM("gold") FROM "medal_table" WHERE "nation"='algeria' AND "total"<3;