fixed according last comments

This commit is contained in:
SERGEY_KONEV
2025-12-24 22:52:42 +03:00
parent b9c57af980
commit 6b5ae71123
@@ -1,11 +1,11 @@
/#
/*
- ВИТРИНА ДЛЯ АНАЛИЗА КОНВЕРСИИ ПРОХОЖДЕНИЯ КУРСА ПОЛЬЗОВАТЕЛЯМИ
- ИТОГОВОЕ РАСПРЕДЕЛЕНИЕ ПО (user_id, course_id)
#/
*/
CREATE MATERIALIZED VIEW dm.course_completion_rate AS
WITH t1 AS (
SELECT DISTINCT
SELECT
e.user_id,
du.name AS user_name,
e.course_id,
@@ -21,7 +21,7 @@ t2 AS (
SELECT
user_id,
course_id,
COUNT(lesson_id) AS lessons_viewed
COUNT(DISTINCT lesson_id) AS lessons_viewed
FROM core.fact_lesson_views
GROUP BY user_id, course_id
)