ZDIFF
Note
Official reference: ZDIFF.
Read the difference between the first sorted set and the others.
Syntax
ZDIFF numkeys key [key ...] [WITHSCORES]
numkeys must match the number of following source keys.
Results
| Return | Rows | Content |
|---|---|---|
| ResultSet | multiple | ELEMENT field, STRING type SCORE field, DOUBLE type (when using WITHSCORES) |
Example
ZADD demo:ranking 10 alice 20 bob
ZADD demo:other 30 alice
ZDIFF 2 demo:ranking demo:other WITHSCORES