We have user_scores_daily
created every day for every user. Each of these records has a _user_id
tag and some numeric fields.
Each user belongs to multiple "groups" (i.e. teams).
We also want to get group_scores_daily
, which containns the sum of user_scores_daily
fields for all users in each group (per day).
We currently do this in a background job with Ruby. It runs every day and combines data using two separate Influx queries.
- We get a mapping of group_id => user_ids