CREATE TABLE "new_york" (
  "poll_source" text,
  "sample_size" real,
  "margin_of_error" real,
  "date" text,
  "democrat" text,
  "republican" text
);

Question: What was the date of the poll with a sample size of 496 where Republican Mike Huckabee was chosen?
SQL: SELECT "date" FROM "new_york" WHERE "republican"='mike huckabee' AND "sample_size"=496;

Question: What is the sample size of the poll taken on Dec 13-15, 2007 that had a margin of error of more than 4 and resulted with Republican Mike Huckabee?
SQL: SELECT AVG("sample_size") FROM "new_york" WHERE "republican"='mike huckabee' AND "margin_of_error">4 AND "date"='dec 13-15, 2007';

Question: Which Democrat was selected in the poll with a sample size smaller than 516 where the Republican chosen was Ron Paul?
SQL: SELECT "democrat" FROM "new_york" WHERE "sample_size"<516 AND "republican"='ron paul';