...
The resulting collection of entities is counted using COUNT(DISTINCT ?s) in the SELECT statement.
...
title | Count agents without labels |
---|
...
The same pattern can be used to count grants (vivo:Grant), organizations (foaf:Organization), or people (foaf:Person) with labels.
Code Block | ||
---|---|---|
| ||
SELECT (COUNT(DISTINCT ?s) AS ?count) WHERE { ?s rdf:type vivofoaf:PositionAgent . OPTIONAL {?s rdfs:label ?label .} FILTER(!bound(?label)) } | ||
Code Block | ||
| ||
SELECT (COUNT(DISTINCT ?s) AS ?count) WHERE { ?s rdf:type vivo:Position . OPTIONAL {?s rdfs:label ?label .} FILTER(!bound(?label)) } |
Code Block | ||
---|---|---|
| ||
SELECT (COUNT(DISTINCT ?s) AS ?count) WHERE { ?s rdf:type vivo:InformationResource . OPTIONAL {?s rdfs:label ?label .} FILTER(!bound(?label)) } |
...