fixed mistakes

This commit is contained in:
Dmitry Medvedev
2026-07-19 20:14:03 +05:00
parent fe1db7ae1e
commit 2dc158dd95
8 changed files with 183 additions and 157 deletions
@@ -5,8 +5,8 @@ SELECT
pl.title AS lesson_title,
pc.id AS course_id,
pc.title AS course_title,
total_views_lesson.total_views AS total_views,
table_unique_viewers.unique_v AS unique_viewers,
COALESCE(total_views_lesson.total_views, 0) AS total_views,
COALESCE(table_unique_viewers.unique_v, 0) AS unique_viewers,
ROUND(AVG(views_one_user_per_one_lesson.views_per_viewer), 2) AS avg_views_per_viewer, --также это можно было посчитать total_views/unique_viewers
DENSE_RANK() OVER (
PARTITION BY pc.id