sparql-examples

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

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

117

rq turtle/ttl

Organization aspect: recent citations

Use at

PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
#defaultView:Table
PREFIX target: <http://www.wikidata.org/entity/Q104785223>

SELECT DISTINCT ?publication_date ?citing_work ?citing_workLabel ?work ?workLabel
WHERE {
  ?researcher ( wdt:P108 | wdt:P463 | wdt:P1416 ) / wdt:P361* target: .
  ?work wdt:P50 ?researcher .
  ?citing_work wdt:P2860 ?work .
  ?citing_work wdt:P577 ?publication_datetime .
  BIND(xsd:date(?publication_datetime) AS ?publication_date)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en" . }
 }
ORDER BY DESC(?publication_date)
LIMIT 200

graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v4("?citing_work"):::projected 
  v6("?publication_date"):::projected 
  v5("?publication_datetime")
  v2("?researcher")
  v3("?work"):::projected 
  a1((" "))
  c10([http://www.bigdata.com/rdf#serviceParam]):::iri 
  c5([http://www.wikidata.org/entity/Q104785223]):::iri 
  c12(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal 
  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;
      v2 --"p:direct/P1416"-->  a1
    end
    subgraph union1r[" "]
      style union1r fill:#abf,stroke-dasharray: 3 3;
      v2 --"p:direct/P463"-->  a1
    end
    union1r <== or ==> union1l
    end
  end
  subgraph union0r[" "]
    style union0r fill:#abf,stroke-dasharray: 3 3;
    v2 --"p:direct/P108"-->  a1
  end
  union0r <== or ==> union0l
  end
  a1 --"p:direct/P361"-->  c5
  v3 --"p:direct/P50"-->  v2
  v4 --"p:direct/P2860"-->  v3
  v4 --"p:direct/P577"-->  v5
  bind0[/"http://www.w3.org/2001/XMLSchema#date(?publication_datetime)"/]
  v5 --o bind0
  bind0 --as--o v6
  subgraph s1["http://wikiba.se/ontology#label"]
    style s1 stroke-width:4px;
    c10 --"wikibase:language"-->  c12
  end