added round in avg_views_per_user

This commit is contained in:
dr0zd
2026-01-05 22:59:05 +07:00
parent 23bb973ab0
commit 1ffc98b49d
+1 -1
View File
@@ -5,7 +5,7 @@ select
count(distinct e.user_id) as unique_users,
count(distinct l.id) as lessons_count,
count(distinct lv.id) as total_views,
count(distinct lv.id)*1.0/count(distinct e.user_id) as avg_views_per_user,
round(count(distinct lv.id)*1.0/count(distinct e.user_id), 2) as avg_views_per_user,
min(lv.viewed_at) as first_viewed_at,
max(lv.viewed_at) as last_viewed_at
from enrollments e