query-aff2fa0e00cf3e9bc38e18841ce303ca
TODO
Use at
- https://query.wikidata.org/sparql
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
WHERE
{
{?item p:P735 ?statement.
?statement pq:P1545 "1" .
?statement ps:P735 wd:Q677191.}
union
{?item wdt:P735 wd:Q677191.
minus {?item wdt:P735 ?thing. filter(?thing!=wd:Q677191)}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?item"):::projected
v2("?statement")
v3("?thing")
c3(["1"]):::literal
c8(["bd:serviceParam"]):::iri
c5(["wd:Q677191"]):::iri
c10(["en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v1 --"p:direct/P735"--> c5
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
f1[["?thing != 'wd:Q677191'"]]
f1 --> v3
v1 --"p:direct/P735"--> v3
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v1 --"p:P735"--> v2
v2 --"p:qualifier/P1545"--> c3
v2 --"p:statement/P735"--> c5
end
union0r <== or ==> union0l
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end