CREATE TABLE "municipalities" (
  "municipality" text,
  "inhabitants" real,
  "mayor" text,
  "party" text,
  "election" real
);

Question: What is livorno's average election?
SQL: SELECT AVG("election") FROM "municipalities" WHERE "municipality"='livorno';

Question: Which Election has a Party of democratic party, and a Mayor of leonardo betti?
SQL: SELECT MAX("election") FROM "municipalities" WHERE "party"='democratic party' AND "mayor"='leonardo betti';

Question: Which Inhabitants have a Mayor of matteo renzi, and an Election larger than 2009?
SQL: SELECT MIN("inhabitants") FROM "municipalities" WHERE "mayor"='matteo renzi' AND "election">2009;

Question: Which Inhabitants have a Party of democratic party, and a Municipality of florence, and an Election smaller than 2009?
SQL: SELECT MIN("inhabitants") FROM "municipalities" WHERE "party"='democratic party' AND "municipality"='florence' AND "election"<2009;