Define a Physical Layer Table with a Select Statement to Complete the Domain
The data for the rest of the domain (the other types of sodas) is all stored at the store level.
To define the entire domain at the aggregate level, for example city and product, you need to have a source that contains the rest of the domain at this level. Because the data at the store level is at a lower, more detailed level than at the city level, it's possible to calculate the city and product level detail from the store and product detail by adding up the product sales data of all of the stores in a city. You can use a query involving the store and product level table.
One way to do this is to define a table in the physical layer with a Select statement that returns the store level calculations. To define the table, go to the physical layer on the physical schema object and create a table on the physical schema object that the SELECT statement uses for the query. Choose Select from the Table Type list, and type the SQL statement in the Default Initialization String box.
The SQL statement must define a virtual table that completes the domain at the level of the other aggregate tables. In this case, there is one existing aggregate table, and it contains data for Coke and Pepsi by city. Therefore, the SQL statement has to return all of the data at the city level, except for the Coke and Pepsi data.