ctx.get and a bounded inverse with ctx.list on
an index that serves it. A query combines those results at one version and
returns a projection. Keep every selection bounded with .first(n), or page
it.
Maintained totals
For counts and exact sums per group, declare atotal on the table. The host
maintains it on every write, so a read never scans the facts:
groupnames one to four fields..total()answers the groups whosegroupstarts with the.wherefields, each{ key, count, sum }.summapst.decimalfields to their fixed scale andt.intfields to0. The sums are exact: aDecimalor abigint.erased: truekeeps counting facts after they are erased, and sums nothing.
.total() that no declared total serves is refused with the total to add.
ctx.count(selection) is always exact as well, but reads the selection.
For an aggregation beyond that, compute and publish a result with
Pipelines.