---
name: AggFn
lang: cpp
domain: core
version: "1.0.0"
algebraic: sum
definition: |
  enum class AggFn {
      Count, Sum, Avg, Min, Max, Distinct, Stddev,
      Median, P25, P75, P90, P99, Percentile
  };
description: "Funcion de agregacion soportada. Pickup via UI combo + SQL emit via tql_to_sql. Percentile usa Aggregation.arg en [0,1]."
tags: [tql, aggregation, sum-type]
uses_types: []
file_path: "cpp/functions/core/data_table_types.h"
---

## Notas

Mapeo SQL DuckDB: Count → `COUNT(*)`, Sum/Avg/Min/Max/Stddev → ops nativas, Distinct → `COUNT(DISTINCT col)`, Median/P25/P75/P90/P99/Percentile → `quantile_cont(col, p)`.
