pub fn build_aggregate_query(
table_name: &str,
function: AggregateFunction,
group_by: &GroupBy,
_columns: &[&str],
from_timestamp: Option<i64>,
to_timestamp: Option<i64>,
) -> StringExpand description
Builds a SQL query for aggregation.
This is the core query builder used by specific aggregation implementations. It provides a flexible way to build SQL queries for different types of time-series data aggregation.
§Arguments
table_name- The source table namefunction- The aggregation function to applygroup_by- The grouping specificationcolumns- The columns to aggregatefrom_timestamp- Optional start of the time rangeto_timestamp- Optional end of the time range
§Returns
A SQL query string for the specified aggregation