Need your wisdom on a relationship and export issue
Good day all.
I have this problem that I'm stuck with from quite some time now, without a feasible solution. I'll try to be as concise as possible.
I have three tables: subscriptions, users, magazine issues. Every subscription is tied to a "company_code", and every user has a "company_code". You can have n subscriptions for a given company_code and n users on a given company_code. Some sample data:
|company code||magazine||start date||end date||sub. type|
the final outcome I need is a csv file with, on each line:
email, magazine, start date, start issue, end date, end issue
The issue I'm running into are the following:
- the "email" field doesn't get repeated on every line but just on the first occourrence
- don't know why but i get a lot of empty records with just the magazine_issues for issues that are not part of the subscription (i have attached a screenshot of the exported file to give you an idea)
I also have attached my relational structure. Is it correct for what i want to achieve? Does anyone has a solution for the non-repeating values for related records?
Thanks in advance for your time.