Created
May 18, 2019 16:13
-
-
Save guyernest/b70ddd3979ee6cd2ea610f3892d76e31 to your computer and use it in GitHub Desktop.
Forecast Pipeline 07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select * from | |
| (select cast(category as integer) as item_num_history, date_trunc('day', calendar_date) as sales_day, sum(sales) as demand | |
| from forecast.compressed_data group by 1,2) as a | |
| right join | |
| (select *, date_trunc('day', from_iso8601_timestamp(date)) as forecast_day, cast(item_id AS integer) as item_num_forecast | |
| from forecast.output_train_1217_category) as b | |
| on a.sales_day = b.forecast_day AND a.item_num_history = b.item_num_forecast |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment