fixed outlier_detector
This commit is contained in:
parent
42d70f72d5
commit
0ea07ed6bf
1 changed files with 2 additions and 1 deletions
|
|
@ -4,12 +4,13 @@
|
|||
with
|
||||
-- Retrieve recent data based on the defined days_to_consider
|
||||
recent_data as (
|
||||
select {{ date_column }}, {{ column_name }}
|
||||
select {{ date_column }}, sum({{ column_name }}) as {{ column_name }}
|
||||
from {{ model }}
|
||||
where
|
||||
{{ date_column }} between (
|
||||
current_date - interval '{{ days_to_consider + 1 }} days'
|
||||
) and (current_date - interval '1 day')
|
||||
group by {{ date_column }}
|
||||
),
|
||||
metrics_stats as (
|
||||
select
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue