diff --git a/lms/data_tasks/report/create_from_scratch/02_entities/03_events/01_create_view.sql b/lms/data_tasks/report/create_from_scratch/02_entities/03_events/01_create_view.sql index 746badc2e6..700aa535d5 100644 --- a/lms/data_tasks/report/create_from_scratch/02_entities/03_events/01_create_view.sql +++ b/lms/data_tasks/report/create_from_scratch/02_entities/03_events/01_create_view.sql @@ -23,7 +23,7 @@ CREATE MATERIALIZED VIEW report.events AS ( translated_events AS ( SELECT - report.multi_truncate('week', timestamp) AS timestamp_week, + report.multi_truncate('week', timestamp::date) AS timestamp_week, user_map.organization_id, event_type.type::report.event_type AS event_type, user_map.user_id diff --git a/lms/data_tasks/report/create_from_scratch/05_activity_counts/02_groups/03_group_activity/01_create_view.jinja2.sql b/lms/data_tasks/report/create_from_scratch/05_activity_counts/02_groups/03_group_activity/01_create_view.jinja2.sql index f14735cdff..42a22f01b1 100644 --- a/lms/data_tasks/report/create_from_scratch/05_activity_counts/02_groups/03_group_activity/01_create_view.jinja2.sql +++ b/lms/data_tasks/report/create_from_scratch/05_activity_counts/02_groups/03_group_activity/01_create_view.jinja2.sql @@ -6,7 +6,7 @@ CREATE MATERIALIZED VIEW report.group_activity AS ( WITH launch_counts AS ( SELECT - report.multi_truncate('week', timestamp) AS timestamp_week, + report.multi_truncate('week', timestamp::date) AS timestamp_week, group_id, COUNT(1) AS launch_count FROM report.group_map