CREATE TABLE "historical_population" (
  "rank" text,
  "county" text,
  "population_1960" real,
  "population_2000" real,
  "population_2040" real
);

Question: What was the population of a county in 1960 that had a population of 467,052 in 2000 and 78,812 in 2040?
SQL: SELECT AVG("population_1960") FROM "historical_population" WHERE "population_2000">'467,052' AND "population_2040"='78,812';

Question: What was the population of a county in 2040 that had a population less than 108,172 in 2000 and less than 107,589 in 1960?
SQL: SELECT COUNT("population_2040") FROM "historical_population" WHERE "population_1960"<'108,172' AND "population_2000"<'107,589';

Question: What was Oslo's population in 1960, with a population of 507,467 in 2000?
SQL: SELECT AVG("population_1960") FROM "historical_population" WHERE "county"='oslo' AND "population_2000">'507,467';