As of 0.20.0, ParadeDB has migrated to a new SQL syntax. The old syntax is still supported and we have preserved the legacy docs here.
0.20.0
Compute several metrics at once
SELECT pdb.agg('{"stats": {"field": "rating"}}') FROM mock_items WHERE id @@@ pdb.all();
agg -------------------------------------------------------------------------------- {"avg": 3.8536585365853657, "max": 5.0, "min": 1.0, "sum": 158.0, "count": 41} (1 row)
Was this page helpful?