diff --git a/.changes/unreleased/Fixes-20221025-164009.yaml b/.changes/unreleased/Fixes-20221025-164009.yaml new file mode 100644 index 00000000..21522a54 --- /dev/null +++ b/.changes/unreleased/Fixes-20221025-164009.yaml @@ -0,0 +1,7 @@ +kind: Fixes +body: Fixing bug with window functionality +time: 2022-10-25T16:40:09.927002+01:00 +custom: + Author: JoeryV + Issue: "146" + PR: "149" diff --git a/macros/sql_gen/gen_base_query.sql b/macros/sql_gen/gen_base_query.sql index d910bc48..3d85cb4c 100644 --- a/macros/sql_gen/gen_base_query.sql +++ b/macros/sql_gen/gen_base_query.sql @@ -14,9 +14,7 @@ calendar_table.date_{{ grain }} as date_{{grain}}, {% endif -%} - {% if grain != 'day' %} calendar_table.date_day as window_filter_date, - {% endif %} {% if secondary_calculations | length > 0 -%} {%- for period in relevant_periods %} @@ -91,9 +89,7 @@ calendar_table.date_{{ grain }} as date_{{grain}}, {% endif -%} - {% if grain != 'day' %} calendar_table.date_day as window_filter_date, - {% endif %} {% if secondary_calculations | length > 0 -%} {%- for period in relevant_periods %} @@ -168,9 +164,7 @@ calendar_table.date_{{ grain }} as date_{{grain}}, {% endif -%} - {% if grain != 'day' %} calendar_table.date_day as window_filter_date, - {% endif %} {% if secondary_calculations | length > 0 -%} {%- for period in relevant_periods %} @@ -242,9 +236,7 @@ calendar_table.date_{{ grain }} as date_{{grain}}, {% endif -%} - {% if grain != 'day' %} calendar_table.date_day as window_filter_date, - {% endif %} {% if secondary_calculations | length > 0 -%} {%- for period in relevant_periods %}