added round in avg_views_per_user
This commit is contained in:
@@ -5,7 +5,7 @@ select
|
|||||||
count(distinct e.user_id) as unique_users,
|
count(distinct e.user_id) as unique_users,
|
||||||
count(distinct l.id) as lessons_count,
|
count(distinct l.id) as lessons_count,
|
||||||
count(distinct lv.id) as total_views,
|
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,
|
min(lv.viewed_at) as first_viewed_at,
|
||||||
max(lv.viewed_at) as last_viewed_at
|
max(lv.viewed_at) as last_viewed_at
|
||||||
from enrollments e
|
from enrollments e
|
||||||
|
|||||||
Reference in New Issue
Block a user