127.0.0.1:6379> ZADD w3ckey 1 redis
(integer) 1
127.0.0.1:6379> ZADD w3ckey 2 mongodb
(integer) 1
127.0.0.1:6379> ZADD w3ckey 3 mysql
(integer) 1
127.0.0.1:6379> ZADD w3ckey 4 mysql
(integer) 0
127.0.0.1:6379> ZRANGE w3ckey 0 10 WITHSCORES
1) “redis”
2) “1”
3) “mongodb”
4) “2”
5) “mysql”
6) “4”
127.0.0.1:6379> ZCARD w3ckey
(integer) 3
127.0.0.1:6379> zcount 1 3
(error) ERR wrong number of arguments for ‘zcount’ command
127.0.0.1:6379> zcount w3ckey 1 3
(integer) 2
127.0.0.1:6379> zincrby w3ckey 3 mysql
“7”
127.0.0.1:6379> ZRANGE w3ckey 0 10 WITHSCORES
1) “redis”
2) “1”
3) “mongodb”
4) “2”
5) “mysql”
6) “7”
127.0.0.1:6379> zrank w3ckey mysql
(integer) 2
127.0.0.1:6379> zscore redis
(error) ERR wrong number of arguments for ‘zscore’ command
127.0.0.1:6379> zscore w3ckey redis
“1”
127.0.0.1:6379> zrevrank w3ckey mysql
(integer) 0
127.0.0.1:6379>