CREATE TABLE "cities_over_1_000_000_population" (
  "rank" real,
  "city" text,
  "province" text,
  "date_of_official_foundation_of_municipality" real,
  "2006" real,
  "1996" real,
  "1986" real,
  "1976" real,
  "1966" real,
  "1956" real
);

Question: What is the 2006 sum with a rank 1 and more than 6758845 in 1996?
SQL: SELECT SUM("2006") FROM "cities_over_1_000_000_population" WHERE "rank"=1 AND "1996">6758845;

Question: What is the total number in 2006, which has an official foundation of municipality of 1918?
SQL: SELECT COUNT("2006") FROM "cities_over_1_000_000_population" WHERE "date_of_official_foundation_of_municipality"=1918;

Question: What is teh average rank of the city of mashhad, which had less than 667770 in 1976?
SQL: SELECT AVG("rank") FROM "cities_over_1_000_000_population" WHERE "city"='mashhad' AND "1976"<667770;

Question: What is the average rank of the province alborz, which had more than 14526 in 1956?
SQL: SELECT AVG("rank") FROM "cities_over_1_000_000_population" WHERE "province"='alborz' AND "1956">14526;