CREATE TABLE "all_councils" (
  "party" text,
  "county" real,
  "city" real,
  "borough" real,
  "town" real,
  "total" real
);

Question: How many counties have people before profit as the party, and a borough greater than 0?
SQL: SELECT SUM("county") FROM "all_councils" WHERE "party"='people before profit' AND "borough">0;

Question: How many counties have 2 as the total, 0 as the city with a town less than 1?
SQL: SELECT SUM("county") FROM "all_councils" WHERE "total"=2 AND "city"=0 AND "town"<1;

Question: What average city has a total less than 2, with a borough greater than 0?
SQL: SELECT AVG("city") FROM "all_councils" WHERE "total"<2 AND "borough">0;