per
relationalai.semantics.std.aggregates
per(*args: Value) -> PerCreate a grouped aggregation context.
Parameters
Section titled “Parameters”
(*argsValue, default:()) - Values defining the grouping.
Returns
Section titled “Returns”Per- APerobject for performing grouped aggregations.
Examples
Section titled “Examples”Compute sum per category:
>>> aggregates.per(Category).sum(amount)Count items per department:
>>> aggregates.per(Department).count()Referenced By
Section titled “Referenced By”RelationalAI Documentation
└── Build With RelationalAI
└── Understand how PyRel works > Use advanced reasoning > Rules-based reasoning
└── Aggregate and group data
├── Understand aggregates and explicit grouping
└── Group results with per()