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

Question: In what Election year was Adalberto Mosaner the Mayor with less than 16,170 Inhabitants?
SQL: SELECT SUM("election") FROM "municipalities_in_trentino" WHERE "mayor"='adalberto mosaner' AND "inhabitants"<'16,170';

Question: In what Election year were there less than 16,170 Inhabitants?
SQL: SELECT COUNT("election") FROM "municipalities_in_trentino" WHERE "inhabitants"<'16,170';

Question: What is the Mayor of Riva del Garda in 2010?
SQL: SELECT "mayor" FROM "municipalities_in_trentino" WHERE "election"=2010 AND "municipality"='riva del garda';

Question: How many Inhabitants were there after 2009 in the Municipality with a Party of union for trentino?
SQL: SELECT AVG("inhabitants") FROM "municipalities_in_trentino" WHERE "party"='union for trentino' AND "election">2009;