In Redis, the ZCARD command returns the cardinality (number of elements) of a sorted set.
Redis
Redis ZINTER Command Explained
In Redis, the ZINTER command returns the intersection of the specified sorted sets. In other words, it returns only those members that are present in all sorted sets.
Redis ZDIFFSTORE Command Explained
In Redis, the ZDIFFSTORE command computes the difference between the first and all successive input sorted sets and stores the result in the specified key.
ZDIFFSTORE works in the same way as the ZDIFF command, except that it stores the result instead of returning it (ZDIFF returns the result instead of storing it in a new key).
Redis ZDIFF Command Explained
In Redis, the ZDIFF command returns the difference between the first and all successive input sorted sets.
Redis ZCOUNT Command Explained
In Redis, the ZCOUNT command returns the number of elements in a sorted set with a score between two given values.
Redis ZRANDMEMBER Command Explained
In Redis, the ZRANDMEMBER command enables us to get one or more random elements from a sorted set.
We can specify whether or not to return only distinct elements or to allow duplicates. We can also specify whether or not to include the scores of each element in the result.