Skip to content

Commit

Permalink
update user activity query
Browse files Browse the repository at this point in the history
  • Loading branch information
FahadKhalid210 committed Apr 22, 2024
1 parent 3060d33 commit b243824
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/20240405_151230_fahad.khalid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Improvement] Update User Activity dataset query to improve average time spent in course. (by @Fahadkhalid210)
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b243824

Please sign in to comment.