Skip to content
Advertisement

Calculate share of value per day per country

DB-Fiddle

Expected Result:


I want to calculate the sales share per country per day as it is done in the question here.

However, since I added the column channel in the database I am not getting the right shares anymore using this query:

How do I need to modify this query to get the expected results?

Advertisement

Answer

here is one way:

or

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement