Skip to main content

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

ReturnRowsContent
ResultSetmultipleELEMENT 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