CREATE TABLE "royal_bavaria" (
  "name" text,
  "title" text,
  "start_term" real,
  "end_term" real,
  "house" text
);

Question: What is the total End term with a Title of prince regent of bavaria?
SQL: SELECT SUM("end_term") FROM "royal_bavaria" WHERE "title"='prince regent of bavaria';

Question: What is the smallest End term with a Start term of 1913, and a Name of ludwig iii?
SQL: SELECT MIN("end_term") FROM "royal_bavaria" WHERE "start_term"=1913 AND "name"='ludwig iii';

Question: Which Title has an 1825 end term?
SQL: SELECT "title" FROM "royal_bavaria" WHERE "end_term"=1825;

Question: What is the average Start term with a 1912 end term?
SQL: SELECT AVG("start_term") FROM "royal_bavaria" WHERE "end_term"=1912;