CREATE TABLE "stadiums" (
  "team" text,
  "stadium" text,
  "capacity" real,
  "opened" real,
  "city" text
);

Question: What is the latest opened year of the team in Glasgow, Scotland?
SQL: SELECT MAX("opened") FROM "stadiums" WHERE "city"='glasgow, scotland';

Question: What is the average opened year of Mini Estadi stadium in Barcelona, Spain?
SQL: SELECT AVG("opened") FROM "stadiums" WHERE "city"='barcelona, spain' AND "stadium"='mini estadi';