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

Question: Which Royal house is named Elah?
SQL: SELECT "royal_house" FROM "list_of_state_leaders_in_870s_bc" WHERE "name"='elah';

Question: What is the type of Leader for the Royal House of Baasha, who is named Elah.
SQL: SELECT "type" FROM "list_of_state_leaders_in_870s_bc" WHERE "royal_house"='baasha' AND "name"='elah';