I want to display leaders board for the users who are earning more points from two different games.
I am storing user scores as per games using redis's sorted sets, How I can get intersect on these games sorted sets to display common leaderborad.
This sounds like a job for ZINTERSTORE:
ZINTERSTORE
ZINTERSTORE leaders-sorted-set 2 game-1-sorted-set game-2-sorted-set AGGREGATE SUM
Since there is no AVG aggregate subcommand, you'll have to divide the resultant scores to obtain that.
AVG
This sounds like a job for
ZINTERSTORE
:Since there is no
AVG
aggregate subcommand, you'll have to divide the resultant scores to obtain that.