CREATE TABLE "stadia_and_attendances" (
  "team" text,
  "stadium" text,
  "capacity" real,
  "highest" real,
  "lowest" real,
  "average" real
);

Question: Team of elgin city, and a Highest smaller than 537 had what total number of average?
SQL: SELECT COUNT("average") FROM "stadia_and_attendances" WHERE "team"='elgin city' AND "highest"<537;

Question: Average larger than 450, and a Capacity smaller than 5,177, and a Stadium of ochilview park is what sum of the highest?
SQL: SELECT SUM("highest") FROM "stadia_and_attendances" WHERE "average">450 AND "capacity"<'5,177' AND "stadium"='ochilview park';

Question: Capacity smaller than 3,292, and a Highest larger than 812, and a Stadium of strathclyde homes stadium has what sum of the average?
SQL: SELECT SUM("average") FROM "stadia_and_attendances" WHERE "capacity"<'3,292' AND "highest">812 AND "stadium"='strathclyde homes stadium';

Question: Lowest larger than 288, and a Team of east stirlingshire has what lowest average?
SQL: SELECT MIN("average") FROM "stadia_and_attendances" WHERE "lowest">288 AND "team"='east stirlingshire';