query-eb823a43af1fca91a9110961a88372b4
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 bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?hogLabel ?hosLabel WHERE {
?item wdt:P31 wd:Q6256.
OPTIONAL { ?item wdt:P1906 ?hos }
OPTIONAL { ?item wdt:P1313 ?hog }
FILTER(!BOUND(?hos)|| !BOUND(?hog)) .
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
} ORDER BY ?item
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?hog")
v2("?hos")
v1("?item"):::projected
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
c2(["wd:Q6256"]):::iri
f0[["(not bound(?hos) || not bound(?hog))"]]
f0 --> v2
f0 --> v3
v1 --"wdt:P31"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P1906".-> v2
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P1313".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end