CREATE TABLE "largest_municipalities_by_population" (
  "rank" text,
  "city" text,
  "population" real,
  "area_km_2" real,
  "density_inhabitants_km_2" real,
  "altitude_mslm" real
);

Question: Which Population has an Altitude (mslm) larger than 98, and a Density (inhabitants/km 2) larger than 5869, and a Rank of 1st?
SQL: SELECT SUM("population") FROM "largest_municipalities_by_population" WHERE "altitude_mslm">98 AND "density_inhabitants_km_2">5869 AND "rank"='1st';

Question: Which Population is the highest one that has a Density (inhabitants/km 2) larger than 2805.8, and a Rank of 1st, and an Altitude (mslm) smaller than 122?
SQL: SELECT MAX("population") FROM "largest_municipalities_by_population" WHERE "density_inhabitants_km_2">2805.8 AND "rank"='1st' AND "altitude_mslm"<122;

Question: Which Altitude (mslm) is the highest one that has an Area (km 2) smaller than 13.01, and a Population of 74536, and a Density (inhabitants/km 2) larger than 5869?
SQL: SELECT MAX("altitude_mslm") FROM "largest_municipalities_by_population" WHERE "area_km_2"<13.01 AND "population"=74536 AND "density_inhabitants_km_2">5869;

Question: Which Altitude (mslm) is the highest one that has a City of legnano, and a Population larger than 59492?
SQL: SELECT MAX("altitude_mslm") FROM "largest_municipalities_by_population" WHERE "city"='legnano' AND "population">59492;