query-7e90886192a055db13ff2cc2dc4c1646
With Fancyclopedia but without SFE
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?fancy WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "en-gb,en,mul". }
{
SELECT DISTINCT ?item WHERE {
?item p:P9307 ?statement0.
?statement0 (ps:P9307) _:anyValueP9307.
MINUS {
?item p:P5357 ?statement1.
?statement1 (ps:P5357) _:anyValueP5357.
}
}
}
OPTIONAL {?item wdt:P9307 ?fancy.}
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?fancy"):::projected
v1("?item"):::projected
v2("?statement0")
v3("?statement1")
a1((" "))
a2((" "))
c4(["en-gb,en,mul"]):::literal
c2(["bd:serviceParam"]):::iri
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c2 --"wikibase:language"--> c4
end
v1 --"p:P9307"--> v2
v2 --"p:statement/P9307"--> a1
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"p:P5357"--> v3
v3 --"p:statement/P5357"--> a2
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P9307".-> v4
end