Question: how many times was the incumbent is John B. Yates?
SQL: SELECT COUNT("Party") FROM "1-2668347-14" WHERE "Incumbent" = 'John B. Yates';

Question: when was the first elected when the  candidates is Thomas Lawyer (DR) 54.9% William Beekman (F) 45.1%?
SQL: SELECT "First elected" FROM "1-2668347-14" WHERE "Candidates" = 'Thomas Lawyer (DR) 54.9% William Beekman (F) 45.1%';

Question: who are the candidates for district New York 10?
SQL: SELECT "Candidates" FROM "1-2668347-14" WHERE "District" = 'New York 10';

Question: how many times were the candidates Thomas H. Hubbard (DR) 51.5% Simeon Ford (F) 48.4%?
SQL: SELECT COUNT("Party") FROM "1-2668347-14" WHERE "Candidates" = 'Thomas H. Hubbard (DR) 51.5% Simeon Ford (F) 48.4%';

Question: what is the district when the party is Federalist and first elected is 1814?
SQL: SELECT "District" FROM "1-2668347-14" WHERE "Party" = 'Federalist' AND "First elected" = '1814';