query-be81ecc03bbc0b431769a0c0533f7200

rq turtle/ttl

tournament management

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?tournament ?tournamentLabel ?tInstance ?tInstanceLabel ?tClass ?tClassLabel ?event ?eventLabel WHERE {
   {
  SELECT DISTINCT ?event ?tournament WHERE {
    ?event wdt:P31/wdt:P279* wd:Q46190676; wdt:P361 ?tournament .
    MINUS { ?tournament wdt:P31 wd:Q47345468 }
    MINUS { ?tournament wdt:P31/wdt:P279* wd:Q13219666 }
  }
}.
  OPTIONAL { ?tournament wdt:P31 ?tInstance }
  OPTIONAL { ?tournament wdt:P279 ?tInstance }
#  FILTER(!BOUND(?tClass)) .
  SERVICE wikibase:label { bd:serviceParam wikibase:language '[AUTO_LANGUAGE],en,it,es,de' }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?event"):::projected v3("?tInstance"):::projected v2("?tournament"):::projected a1((" ")) a2((" ")) c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en,it,es,de"]):::literal c3(["wd:Q46190676"]):::iri c6(["wd:Q13219666"]):::iri c5(["wd:Q47345468"]):::iri v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v1 --"wdt:P361"--> v2 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; v2 --"wdt:P31"--> c5 end subgraph minus1["MINUS"] style minus1 stroke-width:6px,fill:pink,stroke:red; v2 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c6 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P31".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."wdt:P279".-> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end