CREATE TABLE "table1_2668347_14" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" text,
  "result" text,
  "candidates" text
);

Question: how many times was the incumbent is john b. yates?
SQL: SELECT COUNT("party") FROM "table1_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 "table1_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 "table1_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 "table1_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 "table1_2668347_14" WHERE "party"='Federalist' AND "first_elected"='1814';