aggregates
relationalai.semantics.std
Aggregation functions for relational operations.
This module provides functions for aggregating data including:
- Statistical aggregates
- String aggregation
- Ranking and sorting
- Ordering modifiers
- Grouped aggregations
Functions
Section titled “Functions”Functions exposed by this module.
sum() Compute the sum of values.
count() Count the number of values.
min() Find the minimum value.
max() Find the maximum value.
avg() Compute the average of values.
string_join() Join string values with a separator.
asc() Specify ascending order for values in sorting and ranking operations.
desc() Specify descending order for values in sorting and ranking operations.
rank() Compute rank based on the ordering of values.
limit() Limit results based on ordering.
rank_asc() Compute rank in ascending order.
rank_desc() Compute rank in descending order.
top() Get the top N results in descending order.
bottom() Get the bottom N results in ascending order.
per() Create a grouped aggregation context.
Classes
Section titled “Classes”Classes exposed by this module.
Per Group aggregation context for computing per-group aggregates.
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 └── Choose the right aggregate