CREATE TABLE "settlements_by_population" (
  "rank" real,
  "town" text,
  "population" real,
  "year" real,
  "borough" text,
  "definition" text
);

Question: Which Year is the highest one that has a Population larger than 13,012, and a Borough of richmondshire?
SQL: SELECT MAX("year") FROM "settlements_by_population" WHERE "population">'13,012' AND "borough"='richmondshire';

Question: How many people live in Norton?
SQL: SELECT SUM("population") FROM "settlements_by_population" WHERE "town"='norton';

Question: Which Year has a Borough of harrogate, and a Rank smaller than 6, and a Definition of civil parish?
SQL: SELECT "year" FROM "settlements_by_population" WHERE "borough"='harrogate' AND "rank"<6 AND "definition"='civil parish';

Question: Which Definition has a Rank smaller than 12, and a Town of tadcaster?
SQL: SELECT "definition" FROM "settlements_by_population" WHERE "rank"<12 AND "town"='tadcaster';

Question: Which Rank is the lowest one that has a Borough of richmondshire, and a Population larger than 8,178?
SQL: SELECT MIN("rank") FROM "settlements_by_population" WHERE "borough"='richmondshire' AND "population">'8,178';