update user activity query

This commit is contained in:
FahadKhalid210 2024-04-05 15:27:16 +05:00 committed by Fahad Khalid
parent 3060d3393b
commit b2438247cd
2 changed files with 2 additions and 1 deletions

View File

@ -0,0 +1 @@
- [Improvement] Update User Activity dataset query to improve average time spent in course. (by @Fahadkhalid210)

View File

@ -1909,7 +1909,7 @@
"offset": 0,
"params": "{\"remote_id\": 49, \"database_name\": \"admin\"}",
"schema": "openedx",
"sql": "SELECT user_id,\n course_id,\n time,\n arrayJoin(range(floor(toUInt64(toUnixTimestamp(time) - 5)), ceil(toUInt64(toUnixTimestamp(time) + 5)))) AS timestamp\nFROM events\nWHERE event_source = 'browser'",
"sql": "SELECT user_id,\n course_id,\n time,\n arrayJoin(range(floor(toUInt64(toUnixTimestamp(time))), ceil(toUInt64(toUnixTimestamp(time) + 120)))) AS timestamp\nFROM events\nWHERE course_id <> '' and user_id > 0",
"table_name": "User activity",
"template_params": null
}