CREATE TABLE "demography" (
  "year" text,
  "1851" text,
  "1861" text,
  "1871" text,
  "1881" text
);

Question: What's the 1851 when 1881 had 764?
SQL: SELECT "1851" FROM "demography" WHERE "1881"='764';

Question: What's the year when 1851 had 634?
SQL: SELECT "year" FROM "demography" WHERE "1851"='634';

Question: What's the 1881 when 1871 had 1017?
SQL: SELECT "1881" FROM "demography" WHERE "1871"='1017';

Question: What's the 1861 had 1991 in 1881 and a year of year?
SQL: SELECT "1861" FROM "demography" WHERE "year"='year' AND "1881"='1991';

Question: What's the 1881 with 1961 in 1851?
SQL: SELECT "1881" FROM "demography" WHERE "1851"='1961';