Table: windsor_mp_elections
Columns: year
first_member
first_party
second_member
second_party

Question: What is the first party for Lord John Hay earlier than 1857?
SQL: SELECT "first_party" FROM windsor_mp_elections 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 windsor_mp_elections 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 windsor_mp_elections 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 windsor_mp_elections 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 windsor_mp_elections WHERE "first_party" = 'tory' AND "year" = 1820