Changed loop

This commit is contained in:
Joaquin 2025-04-02 12:55:04 +02:00
parent e8da311463
commit 4c011d7063

View file

@ -120,10 +120,6 @@ with
)
{% for time_granularity in ["daily", "weekly", "monthly"] %}
{% if time_granularity != "daily" %}
union all
{% endif %}
select
d.date,
'{{ time_granularity }}' as time_granularity,
@ -145,4 +141,8 @@ with
{% if time_granularity == "weekly" %} where d.is_end_of_week
{% elif time_granularity == "monthly" %} where d.is_end_of_month
{% endif %}
{% if not loop.last %}
union all
{% endif %}
{% endfor %}