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

Question: Who is the democratic incumbent that was re-elected?
SQL: SELECT "incumbent" FROM "california" WHERE "status"='re-elected' AND "party"='democratic';

Question: What year was republican, re-elected incumbent John all barham elected?
SQL: SELECT "elected" FROM "california" WHERE "party"='republican' AND "status"='re-elected' AND "incumbent"='john all barham';