AGG

functionsupportedCore SQL functions

docs.snowflake.com ↗

Aggregate functions

Evaluates and returns the value of a metric in a semantic view when you run a query.

Syntax

AGG( <metric_in_semantic_view> )

Parameters

NameRequiredDescription
metric_in_semantic_viewrequiredName of a metric that is defined in the semantic view that you specify in the FROM clause of the query. You can use the bare (unqualified) metric name, or qualify it with the name of the logical table that defines it (for example, orders.order_average_value). You must qualify the name if more than one logical table in the semantic view defines a metric with the same name. For details, see Requirements for dimensions and metrics in a SELECT statement.

Returns

Returns the value of the specified metric.