Skip to content

Commit

Permalink
fix: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
saraburns1 committed Oct 17, 2024
1 parent 102cb23 commit 6d2036b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions models/video/watched_video_duration.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
materialized="materialized_view",
schema=env_var("ASPECTS_XAPI_DATABASE", "xapi"),
engine=get_engine("ReplacingMergeTree()"),
order_by="(org,course_key,actor_id,video_id)",
order_by="(org,course_key,actor_id)",
post_hook="OPTIMIZE TABLE {{ this }} {{ on_cluster() }} FINAL",
)
}}
Expand Down Expand Up @@ -114,7 +114,7 @@ select
end
) as rewatched_time
from course_data
left join range r on r.course_key = course_data.course_key
left join range on range.course_key = course_data.course_key
left join rewatched r1 on range.event_id = r1.event_id1
left join rewatched r2 on range.event_id = r2.event_id2
group by org, course_key, actor_id, video_id, video_duration
group by org, course_key, actor_id, video_count, video_duration

0 comments on commit 6d2036b

Please sign in to comment.