content/commands/zrevrange.md
Returns the specified range of elements in the sorted set stored at key.
The elements are considered to be ordered from the highest to the lowest score.
Descending lexicographical order is used for elements with equal score.
Apart from the reversed ordering, ZREVRANGE is similar to [ZRANGE]({{< relref "/commands/zrange" >}}).
{{% redis-cli %}} ZADD myzset 1 "one" ZADD myzset 2 "two" ZADD myzset 3 "three" ZREVRANGE myzset 0 -1 ZREVRANGE myzset 2 3 ZREVRANGE myzset -2 -1 {{% /redis-cli %}}
| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | <span title="Supported">✅ Standard</span> <span title="Supported"><nobr>✅ Active-Active</nobr></span> | Deprecated as of Redis v6.2.0. |
{{< multitabs id="zrevrange-return-info" tab1="RESP2" tab2="RESP3" >}}
-tab-sep-
{{< /multitabs >}}