query-90f6724ba8322ccf63fdcd805c0ab737

rq turtle/ttl

All items linked to the current event SELECT distinct ?item ?itemLabel ?connection ?seqLabel ?eventLabel ?classLabel ?wholeLabel WHERE { ?item ?p wd:Q107599005. ?property ?ref ?p . ?property rdf:type wikibase:Property . ?property rdfs:label ?connection FILTER (lang(?connection) = "ru") ?item wdt:P31 ?class. OPTIONAL {?item wdt:P1344 ?event.} OPTIONAL {?item wdt:P179 ?seq.} OPTIONAL {?item wdt:P361 ?whole.} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# All items linked to the current event
SELECT distinct ?item ?itemLabel ?connection ?seqLabel ?eventLabel ?classLabel ?wholeLabel WHERE
{
  ?item ?p wd:Q107599005.
  ?property ?ref ?p .
  ?property rdf:type wikibase:Property .
  ?property rdfs:label ?connection FILTER (lang(?connection) = "ru") 
  ?item wdt:P31 ?class.
  OPTIONAL {?item wdt:P1344 ?event.}
  OPTIONAL {?item wdt:P179 ?seq.}
  OPTIONAL {?item wdt:P361 ?whole.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v6("?class") v1("?connection"):::projected v7("?event") v2("?item"):::projected v3("?p") v4("?property") v5("?ref") v8("?seq") v9("?whole") c4(["wikibase:Property"]):::iri c11(["bd:serviceParam"]):::iri c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal c2(["wd:Q107599005"]):::iri f0[["?connection = 'ru'"]] f0 --> v1 v2 -->v3--> c2 v4 -->v5--> v3 v4 --"a"--> c4 v4 --"rdfs:label"--> v1 v2 --"wdt:P31"--> v6 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P1344".-> v7 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P179".-> v8 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P361".-> v9 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end