sparql-examples

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

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

006

rq turtle/ttl

List of researchers at Maastricht University (via the ROR identifier) citing retracted articles.

Use at

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?researcher ?researcherLabel ?orcid (COUNT(DISTINCT ?article) AS ?count)
WHERE {
  VALUES ?ror { "02jz4aj89" } # 02jz4aj89 is Maastricht University
  ?researcher ( wdt:P108| wdt:P463 | wdt:P1416 ) / wdt:P361* ?organization .
  ?researcher rdfs:label ?researcherLabel . FILTER (LANG(?researcherLabel) = "en") .
  OPTIONAL { ?researcher wdt:P496 ?orcid }
  ?organization wdt:P6782 ?ror .
  ?article wdt:P50 ?researcher; wdt:P2860 ?retractedArticle .
  ?retractedArticle wdt:P31 wd:Q45182324 .
} GROUP BY ?researcher ?researcherLabel ?orcid
  ORDER BY DESC(?count)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v7("?article"):::projected 
  v9("?count")
  v6("?orcid"):::projected 
  v5("?organization")
  v4("?researcher"):::projected 
  v2("?researcherLabel"):::projected 
  v8("?retractedArticle")
  v3("?ror")
  a1((" "))
  c12(["wd:Q45182324"]):::iri 
  f0[["?researcherLabel = 'en'"]]
  f0 --> v2
  bind1[/VALUES ?ror/]
  bind1-->v3
  bind10(["02jz4aj89"])
  bind10 --> bind1
  subgraph union0[" Union "]
  subgraph union0l[" "]
    style union0l fill:#abf,stroke-dasharray: 3 3;
    subgraph union1[" Union "]
    subgraph union1l[" "]
      style union1l fill:#abf,stroke-dasharray: 3 3;
      v4 --"wdt:P1416"-->  a1
    end
    subgraph union1r[" "]
      style union1r fill:#abf,stroke-dasharray: 3 3;
      v4 --"wdt:P463"-->  a1
    end
    union1r <== or ==> union1l
    end
  end
  subgraph union0r[" "]
    style union0r fill:#abf,stroke-dasharray: 3 3;
    v4 --"wdt:P108"-->  a1
  end
  union0r <== or ==> union0l
  end
  a1 --"wdt:P361"-->  v5
  v4 --"rdfs:label"-->  v2
  subgraph optional0["(optional)"]
  style optional0 fill:#bbf,stroke-dasharray: 5 5;
    v4 -."wdt:P496".->  v6
  end
  v5 --"wdt:P6782"-->  v3
  v7 --"wdt:P50"-->  v4
  v7 --"wdt:P2860"-->  v8
  v8 --"wdt:P31"-->  c12
  bind3[/"count(?article)"/]
  v7 --o bind3
  bind3 --as--o v9