We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 861b095 commit ebab03eCopy full SHA for ebab03e
1 file changed
macros/get_metric_sql.sql
@@ -143,8 +143,8 @@ joined as (
143
bounded as (
144
select
145
*,
146
- {% if start_date %} '{{ start_date }}' {% else %} min(case when has_data then period end) over () {% endif %} as lower_bound,
147
- {% if end_date %} '{{ end_date }}' {% else %} max(case when has_data then period end) over () {% endif %} as upper_bound
+ {% if start_date %}cast('{{ start_date }}' as date){% else %} min(case when has_data then period end) over () {% endif %} as lower_bound,
+ {% if end_date %}cast('{{ end_date }}' as date){% else %} max(case when has_data then period end) over () {% endif %} as upper_bound
148
from joined
149
),
150
0 commit comments