text: Below is an context that describes a sql query, paired with an question that provides further information. Write an answer that appropriately completes the request.  # noqa: E501
  ### Context:
  CREATE TABLE table_1342013_31 (party VARCHAR, result VARCHAR)
  ### Question:
  What number of party had a candidate  resigned when appointed judge democratic hold?
  ### Answer:
  SELECT COUNT(party) FROM table_1342013_31 WHERE result = "Resigned when appointed judge Democratic hold"