
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeYou can achieve this by combining filtering, ordering, and slicing in GROQ. Here's how to fetch documents with "dance" as a category while excluding the latest 8 documents:
*[_type == "yourDocumentType" && category == "dance"]
| order(_createdAt desc) [8..]Let me break this down:
*[_type == "yourDocumentType" && category == "dance"] - Filters documents to only those with "dance" as the category| order(_createdAt desc) - Sorts all matching documents by creation date, newest first (you could also use _updatedAt or any other date field)[8..] - Slices the array starting from index 8 to the end, effectively skipping the first 8 (latest) documentsThe key here is the slice component syntax. Using [8..] means "start at index 8 and include everything after that." Since arrays are zero-indexed, this skips indices 0-7 (the 8 most recent documents).
If you want to also limit the total number of results, you can extend the slice:
*[_type == "yourDocumentType" && category == "dance"]
| order(_createdAt desc) [8..17]This would give you documents 9-18 (skipping the latest 8, then returning the next 10).
Important note: Make sure to replace _createdAt with whatever date field makes sense for determining "latest" in your use case - it could be a custom publishedAt field or _updatedAt depending on your content model.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store