Forum Discussion
Using RELATED for tables
- 4 years ago
Looking at the tables:
Sales is at the state granularity.
The city table is at the city granularity so each state there has multiple cities. Eg it might look like:
State City A 1 A 2 A 3 B 4 B 5 B 6 C 7 C 8 (Note City is unique but State is repeated).
You can join state to state between the tables but it will be many to many not 1 to many.
RELATED as you're aware only gets data from the 1 side of a 1 to many relationship.
Looking at the tables:
Sales is at the state granularity.
The city table is at the city granularity so each state there has multiple cities. Eg it might look like:
| State | City |
| A | 1 |
| A | 2 |
| A | 3 |
| B | 4 |
| B | 5 |
| B | 6 |
| C | 7 |
| C | 8 |
(Note City is unique but State is repeated).
You can join state to state between the tables but it will be many to many not 1 to many.
RELATED as you're aware only gets data from the 1 side of a 1 to many relationship.
Thanks! I understand it now.