CREATE TABLE "results" (
  "district" real,
  "incumbent" text,
  "party" text,
  "elected" real,
  "status" text
);

Question: What was the year elected in District 17?
SQL: SELECT MIN("elected") FROM "results" WHERE "district"=17;

Question: What was the year elected in District 15?
SQL: SELECT "elected" FROM "results" WHERE "district"=15;

Question: What year was Incumbent Ed Towns elected with a district smaller than 10?
SQL: SELECT AVG("elected") FROM "results" WHERE "incumbent"='ed towns' AND "district"<10;

Question: What party has a district of 28 and was elected after 1983?
SQL: SELECT "party" FROM "results" WHERE "elected">1983 AND "district"=28;

Question: What's the elected year of Nydia Velazquez in a district bigger than 2 and a democrat?
SQL: SELECT AVG("elected") FROM "results" WHERE "party"='democrat' AND "district">2 AND "incumbent"='nydia velazquez';