CREATE TABLE "justices" (
  "name" text,
  "appointed_elected" text,
  "term_expires" text,
  "appointing_governor" text,
  "governor_s_party_affiliation" text
);

Question: What is the year when chief justice Mark Cady was appointed/elected?
SQL: SELECT "appointed_elected" FROM "justices" WHERE "name"='chief justice mark cady';

Question: What is the expiring term for Daryl Hecht when the appointing governor is Tom Vilsack?
SQL: SELECT "term_expires" FROM "justices" WHERE "appointing_governor"='tom vilsack' AND "name"='daryl hecht';

Question: Which person has an expiring term of December 31, 2020, and has Terry Branstad as the appointing governor?
SQL: SELECT "name" FROM "justices" WHERE "term_expires"='december 31, 2020' AND "appointing_governor"='terry branstad';

Question: What is the party affiliation of Thomas D. Waterman, whose appointing governor is Terry Branstad?
SQL: SELECT "governor_s_party_affiliation" FROM "justices" WHERE "appointing_governor"='terry branstad' AND "name"='thomas d. waterman';

Question: Who has a term that expires on December 31, 2020 and Terry Branstad for an appointing governor?
SQL: SELECT "name" FROM "justices" WHERE "term_expires"='december 31, 2020' AND "appointing_governor"='terry branstad';