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



OSZAR »