You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dbt-models/models/viz_products__stocks_availability.sql
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ joined as (
21
21
distribution_metrics.average_quantity_per_family,
22
22
stocks.stock_at_date,
23
23
-- To improve the model, `visits_moving_average_last_4_distributions` should be replaced by a prediction of the upcoming number of visits
24
-
round(case when stock_at_date>0 then stock_at_date/(average_quantity_per_family*visits_moving_average_last_4_distributions) else 0 end, 2) as count_distributions_available,
24
+
round(case when average_quantity_per_family*visits_moving_average_last_4_distributions>0 then stock_at_date/(average_quantity_per_family*visits_moving_average_last_4_distributions) else 0 end, 2) as count_distributions_available,
25
25
max(distribution_metrics.date_at) over () as date_latest_distribution
0 commit comments