Creates a SQL-based expression for temporal aggregation of species time series
using DuckDB date functions. Used internally by prep_ts_sp.
Value
Expression object suitable for use in dplyr::mutate() with dbplyr
Details
For seasonal aggregation (ts_res = "quarter"), all quarters are
normalized to year 2000 to enable cyclic plotting. Uses DuckDB's
date_trunc() and extract() functions for database-side computation.
See also
prep_ts_sp for usage context