Table: maximilian_i_joseph
Columns: name
title
start_term
end_term
house

Question: What is the total End term with a Title of prince regent of bavaria?
SQL: SELECT SUM("end_term") FROM maximilian_i_joseph 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 maximilian_i_joseph WHERE "start_term" = 1913 AND "name" = 'ludwig iii'

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

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