query-31df8dc9021b2866696b9c736ab81415

rq turtle/ttl

Propertiesexpansion of (P8646)instance of (P31)of (P642)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?game ?gameLabel WHERE {
  ?item p:P31 ?p31.
  ?p31 ps:P31 wd:Q1066707.
  OPTIONAL { ?p31 pq:P642 ?game. }
  FILTER(NOT EXISTS { ?item wdt:P8646 _:b6. })
  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; v3("?game"):::projected v1("?item"):::projected v2("?p31") a1((" ")) c7(["bd:serviceParam"]):::iri c4(["wd:Q1066707"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"p:direct/P8646"--> e0a1 e0v1("?item"):::projected e0a1((" ")):::projected end f0--EXISTS--> f0e0 f0 --> v1 f0 --> c1 f0 --> a1 v1 --"p:direct/P8646"--> a1 v1 --"p:P31"--> v2 v2 --"p:statement/P31"--> c4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P642".-> v3 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end