diff --git a/models/reporting/general/monthly_aggregated_metrics_history_by_deal_by_time_window.sql b/models/reporting/general/monthly_aggregated_metrics_history_by_deal_by_time_window.sql index 253280e..cf38baa 100644 --- a/models/reporting/general/monthly_aggregated_metrics_history_by_deal_by_time_window.sql +++ b/models/reporting/general/monthly_aggregated_metrics_history_by_deal_by_time_window.sql @@ -6,6 +6,7 @@ with select date as date, + date_trunc('month', date)::date as first_day_month, id_deal as id_deal, time_window as time_window, metric_from_date as metric_from_date, diff --git a/models/reporting/general/monthly_growth_score_by_deal.sql b/models/reporting/general/monthly_growth_score_by_deal.sql index 73dc0bb..d354319 100644 --- a/models/reporting/general/monthly_growth_score_by_deal.sql +++ b/models/reporting/general/monthly_growth_score_by_deal.sql @@ -4,8 +4,8 @@ with ) select date as date, + date_trunc('month', date)::date as first_day_month, id_deal as id_deal, - client_type as client_type, main_deal_name as main_deal_name, has_active_pms as has_active_pms, diff --git a/models/reporting/general/schema.yml b/models/reporting/general/schema.yml index 9836f22..10983fc 100644 --- a/models/reporting/general/schema.yml +++ b/models/reporting/general/schema.yml @@ -641,6 +641,13 @@ models: data_tests: - not_null + - name: first_day_month + data_type: date + description: | + First day of the month corresponding to the date field. + data_tests: + - not_null + - name: client_type data_type: string description: | @@ -1479,6 +1486,13 @@ models: data_tests: - not_null + - name: first_day_month + data_type: date + description: | + First day of the month corresponding to the date field. + data_tests: + - not_null + - name: id_deal data_type: character varying description: Id of the deal associated to the host.