query-7d65b30970b0ae025df64b774d7b1ec4
Anti-pattern 3Conflicting instance-of relations: C is an instance of A and B, but B is also an instance of A. The following query would fetch these cases:
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?classA (count(*) as ?count) WHERE {
?classC wdt:P31 ?classA;
wdt:P31 ?classB .
?classB wdt:P31 ?classA .
} group by ?classA order by desc(?count)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?classA"):::projected
v4("?classB")
v2("?classC")
v5("?count")
v2 --"wdt:P31"--> v3
v2 --"wdt:P31"--> v4
v4 --"wdt:P31"--> v3
bind1[/"count(*)"/]
bind1 --as--o v5