Group records and aggregate each group
One step with Prisma. We can help you get access.
Look something up
Group records and aggregate each group
with Prisma
Works with AI assistants
Use Prisma: its Prisma Client Aggregation API lets you group records and aggregate each group in a single step (GET /{model}/groupBy). Prisma also has an MCP server, so an AI assistant like Claude or ChatGPT can do it for you. capabilities.work can help you get signed up and connected.
- How do I group my orders by status and total each group?
- Can I drop groups whose aggregate doesn't meet a threshold?
- Which order do grouped results come back in, and can I sort them?
Say it to your AI assistant
- Group {model} records by {by}.
- Group {model} by {by}, keeping only groups where {having}.
- Break {model} down by {by} and sort the groups by {orderBy}.
For your developer
GET /{model}/groupBy in Prisma Client Aggregation API. Full spec on APIs.io.