per
relationalai.semantics.std.aggregates
per(*args: Value) -> PerCreate a grouped aggregation context.
Parameters
(*argsValue, default:()) - Values defining the grouping.
Returns
Per- APerobject for performing grouped aggregations.
Examples
Compute sum per category:
aggregates.per(Category).sum(amount)Count items per department:
aggregates.per(Department).count()Referenced By
RelationalAI Documentation
├── Build With RelationalAI
│ └── Understand how PyRel works > Use advanced reasoning > Rules-based reasoning
│ └── Aggregate and group data
│ └── Group results with per()
└── Release Notes
└── Python API Release Notes
└── What’s New in Version 1.22.0
└── Bug Fixes