diff --git a/models/video/watched_video_duration.sql b/models/video/watched_video_duration.sql index f777195..cf00f65 100644 --- a/models/video/watched_video_duration.sql +++ b/models/video/watched_video_duration.sql @@ -88,10 +88,10 @@ with and b.start_emission_time > a.start_emission_time ), course_data as ( - select course_key, count(distinct block_id) video_count + select org, course_key, count(distinct block_id) video_count from {{ ref('dim_course_blocks') }} - where block_name = 'Video' - group by course_key + where block_type = 'video' + group by org, course_key ) select org,