sparql-examples

A set of SPARQL examples that are used in different TGX resources

View the Project on GitHub BiGCAT-UM/sparql-examples

008

rq turtle/ttl

The number of authors (by P50) citing retracted articles.

Use at

PREFIX wd: <http://wikidata.org/entity/>
PREFIX wdt: <http://wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>

SELECT (COUNT(DISTINCT ?author) AS ?count) WHERE {
  ?citingRetracted wdt:P2860 ?retracted ; wdt:P50 ?author .
  ?retracted wdt:P31 wd:Q45182324 .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?author"):::projected 
  v1("?citingRetracted")
  v4("?count")
  v2("?retracted")
  c4(["wd:Q45182324"]):::iri 
  v1 --"wdt:P2860"-->  v2
  v1 --"wdt:P50"-->  v3
  v2 --"wdt:P31"-->  c4
  bind1[/"count(?author)"/]
  v3 --o bind1
  bind1 --as--o v4