ZREVRANGE
Note
Official reference: ZREVRANGE.
Read a range by descending rank.
Syntax
ZREVRANGE key start stop [WITHSCORES]
Ranks are zero-based and the end position is inclusive; negative indices count from the end.
ZRANGE ... REV is also available.
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
ZREVRANGE demo:ranking 0 9 WITHSCORES