Skip to content

docs(zql): document aggregates - #328

Open
arv wants to merge 1 commit into
mainfrom
arv/aggregates
Open

arv wants to merge 1 commit into
mainfrom
arv/aggregates

Conversation

@arv

@arv arv commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Adds an Aggregates section to the ZQL page covering count(), sum(), avg(), min(), and max() on queries and relationships:

  • A top-level aggregate returns a single value. On a relationship, each row gets the value in place of the related rows.
  • Only the result is synced, and it stays up to date as rows change.
  • where(), start(), and limit() apply before the aggregate, as in SQL.
  • Column types, empty results (0 for count(), null otherwise), and which aggregates update immediately when a mutator runs.

Also regenerates assets/search-index.json.

Draft until aggregates ship in a Zero release. The roadmap and status pages still list aggregates as future work and should be updated then; group-by remains open.

@vercel

vercel Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
zero-docs Ready Ready Preview Oct 27, 2026 11:15am UTC

Request Review

@arv
arv requested a lite review from Copilot October 27, 2026 11:17
@arv
arv requested a review from aboodman October 27, 2026 11:17
@arv
arv marked this pull request as ready for review October 27, 2026 11:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The remaining feedback is limited to non-blocking wording nits.

No open issues 🎉

What changed in this PR

Documents ZQL aggregate queries and regenerates the search index for the new documentation section.

Changes:

  • Adds documentation for count(), sum(), avg(), min(), and max().
  • Covers relationship aggregates, filtering, pagination, result types, synchronization, and mutation updates.
  • Regenerates search-index entries and heading identifiers.
File Summary
contents/​docs/​zql.mdx Adds the Aggregates section with usage examples and behavioral details.
assets/​search-index.json Indexes the new section and updates subsequent section identifiers.

Review effort: Lite

This branch was successfully deployed

1 active deployment
Preview — 4fcf0ea6 Deployed Oct 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants