is a query operator that yields a solution containing the variable "var" whose value is computed from the aggregate agg.
yields a solution containing multiple aggregates.
aggregates solutions grouped by the value of groupby.
includes only groups for which having evaluates to True.
orders groups by the value of orderby.
- A RightComposition of operators SPARQLSelect[…]/*…/*SPARQLAggregate[…]/*… can be used in SPARQLExecute to query a SPARQL endpoint. Composition is also supported.
- SPARQLAggregate[…] can be applied to the result of a SPARQLSelect query.
- In SPARQLAggregate["var"agg], agg is usually of the form SPARQLEvaluation["f"][u1,u2,…], where "f" is the name of a SPARQL aggregate function, and each ui is a SPARQLVariable whose associated values withing a solution group are supplied to the aggregate function.
- Named SPARQL aggregate functions include:
"COUNT" counts the number of elements in a group "SUM" totals the values of a group "MIN" returns the minimum value in a group "MAX" returns the maximum value in a group "AVG" returns the averag of the values in a group "GROUP_CONCAT" joins String values of a group "SAMPLE" returns an arbitrary value from the group
- SPARQLEvaluation["GROUP_CONCAT"][var, "Separator" -> "sep"] can be used to join strings using separator "sep". The default separator is " " (space).