Show me the names of all the cities.
select headquartered_city from district
How about the names of all the stores?
select store_name from store
Which cities have these stores?
select distinct t1.headquartered_city from district as t1 join store_district as t2 on t1.district_id = t2.district_id join store as t3 on t3.store_id = t2.store_id
What is the number of stores for each of these cities?
select t3.headquartered_city, count(*) from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id group by t3.headquartered_city