CREATE TABLE "2013" (
  "2013_republican_primary" text,
  "manhattan" text,
  "the_bronx" text,
  "brooklyn" text,
  "queens" text,
  "staten_island" text,
  "total" real,
  "pct" text
);

Question: What was Staten Island when Brooklyn was 940?
SQL: SELECT "staten_island" FROM "2013" WHERE "brooklyn"='940';

Question: What was the total number in Manhattan when Staten Island was 12,658?
SQL: SELECT COUNT("manhattan") FROM "2013" WHERE "staten_island"='12,658';

Question: What was the total in Brooklyn when Manhattan was 3,139?
SQL: SELECT "brooklyn" FROM "2013" WHERE "manhattan"='3,139';

Question: Who was the republican candidate in 2013 when Staten Island was 451?
SQL: SELECT "2013_republican_primary" FROM "2013" WHERE "staten_island"='451';

Question: What was the amount in Staten Island when The Bronx was 1,281?
SQL: SELECT "staten_island" FROM "2013" WHERE "the_bronx"='1,281';