query-1b7bbe3f5323b64053dbb802ec894488
Propertiesinstance of (P31)subclass of (P279)characters (P674)
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 ?f ?fLabel ?w ?wLabel WHERE {
?f wdt:P31/wdt:P279* wd:Q95074 .
#
?w wdt:P674 ?f .
?w wdt:P31/wdt:P279* wd:Q15416 .
FILTER NOT EXISTS {?w wdt:P31/wdt:P279* wd:Q581714} .
FILTER NOT EXISTS {?w wdt:P31/wdt:P279* wd:Q1107} .
# ignore episodes for now
FILTER NOT EXISTS {?w wdt:P31 wd:Q1983062} .
#
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;
v2("?f"):::projected
v1("?w"):::projected
a3((" "))
a4((" "))
a2((" "))
a1((" "))
c8(["wd:Q15416"]):::iri
c4(["wd:Q1107"]):::iri
c10(["bd:serviceParam"]):::iri
c2(["wd:Q1983062"]):::iri
c5(["wd:Q581714"]):::iri
c12(["en"]):::literal
c6(["wd:Q95074"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P31"--> e0c2
e0v1("?w"):::projected
e0c2(["wd:Q1983062"]):::iri
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> c2
v1 --"wdt:P31"--> c2
f1[["not "]]
subgraph f1e1["Exists Clause"]
e1v1 --"wdt:P31"--> e1a1
e1a1 --"wdt:P279"--> e1c3
e1v1("?w"):::projected
e1a1((" ")):::projected
e1c3(["wd:Q1107"]):::iri
end
f1--EXISTS--> f1e1
f1 --> v1
f1 --> c1
f1 --> a1
f1 --> c3
f1 --> c4
v1 --"wdt:P31"--> a1
a1 --"wdt:P279"--> c4
f2[["not "]]
subgraph f2e2["Exists Clause"]
e2v1 --"wdt:P31"--> e2a1
e2a1 --"wdt:P279"--> e2c3
e2v1("?w"):::projected
e2a1((" ")):::projected
e2c3(["wd:Q581714"]):::iri
end
f2--EXISTS--> f2e2
f2 --> v1
f2 --> c1
f2 --> a2
f2 --> c3
f2 --> c5
v1 --"wdt:P31"--> a2
a2 --"wdt:P279"--> c5
v2 --"wdt:P31"--> a3
a3 --"wdt:P279"--> c6
v1 --"wdt:P674"--> v2
v1 --"wdt:P31"--> a4
a4 --"wdt:P279"--> c8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c10 --"wikibase:language"--> c12
end