Skip to content
Advertisement

disaggregate 3d time periods into daily

table_1 shows the aggregation of the revenue by different geographies

I would like to disaggregate the 3d period to daily: table_2

as a next step, I would like to also change the table_2 format into table_3:

From table_1 to table_2, I am not sure. From table_2 to table_3, I am thinking of:

With the code above, however, the date column is not included into the cross join..

Advertisement

Answer

To go from table 1 to table 3 using the logic that you propose:

Here is a db<>fiddle.

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