Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The resulting collection of entities is counted using COUNT(DISTINCT ?s) in the SELECT statement.

...

titleCount 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
titleCount positions agents without labels
SELECT (COUNT(DISTINCT ?s) AS ?count)
WHERE {
    ?s rdf:type vivofoaf:PositionAgent .
    OPTIONAL {?s rdfs:label ?label .}
	FILTER(!bound(?label))
}
Code Block
titleCount positions without labels
SELECT (COUNT(DISTINCT ?s) AS ?count)
WHERE {
    ?s rdf:type vivo:Position .
    OPTIONAL {?s rdfs:label ?label .}
	FILTER(!bound(?label))
}


Code Block
titleCount publications information resources without labels
SELECT (COUNT(DISTINCT ?s) AS ?count)
WHERE {
    ?s rdf:type vivo:InformationResource .
    OPTIONAL {?s rdfs:label ?label .}
    FILTER(!bound(?label))
}

...