CREATE TABLE "south_carolina" (
  "district" text,
  "incumbent" text,
  "party" text,
  "first_elected" real,
  "results" text
);

Question: What is the average first elected for the district South Carolina 2?
SQL: SELECT AVG("first_elected") FROM "south_carolina" WHERE "district"='south carolina 2';

Question: Who was the first elected for the republican party?
SQL: SELECT "first_elected" FROM "south_carolina" WHERE "party"='republican';

Question: What party has the South Carolina 2 district?
SQL: SELECT "party" FROM "south_carolina" WHERE "district"='south carolina 2';