CREATE TABLE "list_of_state_leaders_in_499_bc" (
  "state" text,
  "type" text,
  "name" text,
  "title" text,
  "royal_house" text,
  "from" text
);

Question: What is the type for Duke when the from is 512 bc?
SQL: SELECT "type" FROM "list_of_state_leaders_in_499_bc" WHERE "title"='duke' AND "from"='512 bc';

Question: What state is Ding and has a royal house of Ji?
SQL: SELECT "state" FROM "list_of_state_leaders_in_499_bc" WHERE "royal_house"='ji' AND "name"='ding';

Question: Which name has a state of Yan?
SQL: SELECT "name" FROM "list_of_state_leaders_in_499_bc" WHERE "state"='yan';

Question: Which state has a royal house of Ying?
SQL: SELECT "state" FROM "list_of_state_leaders_in_499_bc" WHERE "royal_house"='ying';

Question: Which state has a royal house of Jiang?
SQL: SELECT "state" FROM "list_of_state_leaders_in_499_bc" WHERE "royal_house"='jiang';