I do have a problem how to realize a query regarding different data in a row and multiple columns in tow different and separate tables.
The first table contains a column containing a letter for a specific country: in this case A (Austria), CH (Swiss), D (Germany) and a customer code row. The country code appears multiple times in different rows in this table for multiple and different customers.
Example Customer A has bought something in January and in March, customer B hast bought different products in August September and December, Customer C hast bought products in January and February.
In this Case
customer A from Germany (D) appears in the table in JAN and MAR,
customer B from Swiss (CH) appears in the table in AUG, SEP and DEC,
customer C from Austria (a) appears in the table in JAN and FEB.
The second table contains a year column, a month column, and the turnover column and the customer code column.
What I want to do is to point out for each month in the year 2015 for the customers of these 3 countries in a separate querry:
1. row: the respective turnover 2015 for those 3 countries, separated into rows for each month of the year.
2. row: the cumulated turnover 2015 for those 3 countries for every following month, also separated into rows for each month of the year.
Can anyone tell me how to implement the query for this?