use proper table, proper col, and remove off by one error

This commit is contained in:
Pablo Martin 2024-06-17 11:31:54 +02:00
parent a8892e7d5d
commit 1203d0921b

View file

@ -82,12 +82,11 @@ with
from from
generate_series generate_series
( (
{{ var("start_date") }}::timestamp, '2020-01-01'::timestamp,
( (
select max(most_recent_date_utc) select min(oldest_date_utc) from oldest_xe_date_per_curr_pair
from most_recent_xe_date_per_curr_pair
)::timestamp )::timestamp
- interval '2 days', -- we don't want to pick the last real day, - interval '1 days', -- we don't want to pick the last real day,
'1 day'::interval '1 day'::interval
) day_series ) day_series
), ),