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_name_54 (type VARCHAR, royal_house VARCHAR, title VARCHAR)
  ### Question:
  What type of state has a royal house of ji and has a ruler?
  ### Answer:
  SELECT type FROM table_name_54 WHERE royal_house = "ji" AND title = "ruler"