Table: state_leaders_499_bc
Columns: state
type
name
title
royal_house
from

Question: What is the type for Duke when the from is 512 bc?
SQL: SELECT "type" FROM state_leaders_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 state_leaders_499_bc WHERE "royal_house" = 'ji' AND "name" = 'ding'

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

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

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