query-7bc8e341b5c4c9142855e7f13035d57c
deity and subclasses w/o domain SELECT DISTINCT ?s ?sLabel WHERE { ?s wdt:P31/wdt:P279* wd:Q178885 . OPTIONAL { ?s wdt:P2925 ?domain } FILTER ( !bound(?domain) ) . SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } } ORDER BY ?sLabel
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#>
# deity and subclasses w/o domain
SELECT DISTINCT ?s ?sLabel WHERE {
?s wdt:P31/wdt:P279* wd:Q178885 .
OPTIONAL {
?s wdt:P2925 ?domain
}
FILTER ( !bound(?domain) ) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?sLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?domain")
v3("?s"):::projected
v1("?sLabel"):::projected
a1((" "))
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
c3(["wd:Q178885"]):::iri
f0[["not bound(?domain)"]]
f0 --> v2
v3 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c3
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P2925".-> v2
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end