sparql-examples

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

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

090

rq turtle/ttl

Event aspect: sponsors

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 target: <http://www.wikidata.org/entity/Q133457282>

SELECT ?sponsor ?sponsorLabel ?sponsorUrl ?sponsorDescription
WHERE {
  target: wdt:P859 ?sponsor .
  BIND(CONCAT("/sponsor/", SUBSTR(STR(?sponsor), 32)) AS ?sponsorUrl)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
}

graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?sponsor"):::projected 
  v2("?sponsorUrl"):::projected 
  c4([http://www.bigdata.com/rdf#serviceParam]):::iri 
  c1([http://www.wikidata.org/entity/Q133457282]):::iri 
  c6(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal 
  c1 --"p:direct/P859"-->  v1
  bind0[/"concat('/sponsor/',substring(str(?sponsor),'32^^xsd:integer'))"/]
  v1 --o bind0
  bind0 --as--o v2
  subgraph s1["http://wikiba.se/ontology#label"]
    style s1 stroke-width:4px;
    c4 --"wikibase:language"-->  c6
  end