Skip to main content

count_if

Aggregates boolean values. Returns the number of TRUE boolean values.

Returns: integer

Table 1.

Parameter

Type

Description

value

boolean

The values to count



Example

Query

PREFIX : <https://ddw-doccorp.linked.data.world/d/sparql-aggregation-sample-queries/>
PREFIX agg: <http://data.world/function/aggregate#>

SELECT (agg:countIf(?foo > 3) AS ?count_if)
{
    [ :col-aggregations-foo ?foo ]
}

Try the query

Table 1. Results

count_if

4