I am making software that analyses data for a country.
This country has two regions. In each region there are four municipalities; in each municipality there are four cities and each city has four people.
Income per geographical level is easy to query. For "get people from region A" I sum the income.
I want to create geographical levels that are not logical but serve an analytical purpose. For example, split region A into two sub-regions, with two municipalities each.
My first approach (which might be a wrong one) would be to create another table.
I have a table with sub-regions 1 and 2 which are parts of region A.
Region A is divided in sub-region 1, sub-region 2 and four municipalities let's say B C D E. But B and C are part of sub-region 1 and D E are part of sub-region 2.
If I want to see the people in Region A, I'll count some people twice because they are in sub-region 1 but also in municipalitiy B.
What is the way to deal with these virtual groups?