user-management: exclude non-active-user-events from "events_count" aggregation
Created by: erzhtor
Closes https://github.com/sourcegraph/sourcegraph/issues/41250.
Test plan
- Check the diff
OR
- Delete all rows from
aggregated_user_statistics
table sg start
- wait ~5 minutes for user statistics aggregation job to start/finish
- Open http://localhost:3080/site-admin/users
- Check that the "Events" and "Last Active" columns are populated with data