CREATE TABLE "minnesota_counties_ranked_by_per_capita_" (
  "county" text,
  "per_capita_income" text,
  "median_household_income" text,
  "median_family_income" text,
  "population" real,
  "number_of_households" real
);

Question: Which Number of households has Per capita income of $21,571, and a Population smaller than 9,783?
SQL: SELECT AVG("number_of_households") FROM "minnesota_counties_ranked_by_per_capita_" WHERE "per_capita_income"='$21,571' AND "population"<'9,783';

Question: Which Number of households has a County of cook, and Population smaller than 5,176?
SQL: SELECT AVG("number_of_households") FROM "minnesota_counties_ranked_by_per_capita_" WHERE "county"='cook' AND "population"<'5,176';

Question: What Per capita income has a Median family income of $50,755?
SQL: SELECT "per_capita_income" FROM "minnesota_counties_ranked_by_per_capita_" WHERE "median_family_income"='$50,755';

Question: What Number of households have a Median family income of $58,491?
SQL: SELECT "number_of_households" FROM "minnesota_counties_ranked_by_per_capita_" WHERE "median_family_income"='$58,491';