CREATE TABLE "m_ps_1707_1868" (
  "year" real,
  "first_member" text,
  "first_party" text,
  "second_member" text,
  "second_party" text
);

Question: What is the first party for Lord John Hay earlier than 1857?
SQL: SELECT "first_party" FROM "m_ps_1707_1868" WHERE "year"<1857 AND "first_member"='lord john hay';

Question: Who is the second member more recently than 1790 when John Williams is the first member?
SQL: SELECT "second_member" FROM "m_ps_1707_1868" WHERE "year">1790 AND "first_member"='john williams';

Question: Who is the second member ewarlier than 1804 when Tory Henry Isherwood is the first member?
SQL: SELECT "second_member" FROM "m_ps_1707_1868" WHERE "first_party"='tory' AND "year"<1804 AND "first_member"='henry isherwood';

Question: Who is the second member when RT Hon. Edward Stanley is the first member?
SQL: SELECT "second_member" FROM "m_ps_1707_1868" WHERE "first_member"='rt hon. edward stanley';

Question: What is the second party where the first party is Tory and the year is 1820?
SQL: SELECT "second_party" FROM "m_ps_1707_1868" WHERE "first_party"='tory' AND "year"=1820;