# ZSET Range Query

> How do you fetch all members of a Sorted Set whose scores are between 10 and 50, and how do you make the bounds exclusive, sort descending or paginate?

Canonical: https://www.internhack.in/learn/interview/redis-caching/redis-zset-range-by-score
Last updated: 2026-11-28

Difficulty: Intermediate

## Question

How do you fetch all members of a Sorted Set whose scores are between 10 and 50, and how do you make the bounds exclusive, sort descending or paginate?

*The full answer is for InternHack members. Open the page link above to read it.*

## Concepts covered

Sorted Set, ZRANGE BYSCORE, ZRANGEBYSCORE, Exclusive bounds, LIMIT pagination

Previous: [Atomic SET if not exists](https://www.internhack.in/learn/interview/redis-caching/redis-atomic-set-nx) · Next: [Script Caching](https://www.internhack.in/learn/interview/redis-caching/redis-lua-script-cache) · [All of Redis & Caching](https://www.internhack.in/learn/interview/redis-caching)

## More Redis & Caching questions

- [Pausing Clients](https://www.internhack.in/learn/interview/redis-caching/redis-client-pause)
- [Memory Fragmentation](https://www.internhack.in/learn/interview/redis-caching/redis-memory-fragmentation)
- [Client-Side Caching (Redis 6+)](https://www.internhack.in/learn/interview/redis-caching/redis-client-caching-tracking)
- [ACLs (Access Control Lists)](https://www.internhack.in/learn/interview/redis-caching/redis-acl-manager)
- [AOF Sync Options](https://www.internhack.in/learn/interview/redis-caching/redis-appendfsync-options)
- [RDB Compression](https://www.internhack.in/learn/interview/redis-caching/redis-rdb-compression)

## Related

- [Learn](https://www.internhack.in/learn)
- [Interview Prep](https://www.internhack.in/learn/interview)
- [Redis & Caching](https://www.internhack.in/learn/interview/redis-caching)
