Wikidata:WikiProject Ontology/Problems/Anti-pattern 2
Anti-pattern 2
editThis is where a subclass C has two superclasses A and B that are related to one another by an instance of relationship.
- Wikidata:WikiProject Ontology/Problems/pattern 2 direct superclasses
- Wikidata:WikiProject Ontology/Problems/pattern 2 indirect superclasses case 1
- Wikidata:WikiProject Ontology/Problems/pattern 2 indirect superclasses case 2
The general form for this query (which again times out) is:
select ?classA ?classALabel (count(*) as ?count) WHERE {
?classC wdt:P279+ ?classA ;
wdt:P279+ ?classB .
?classB wdt:P31 ?classA .
service wikibase:label {
bd:serviceParam wikibase:language "en" .
}
} group by ?classA ?classALabel order by desc(?count)
Also note this inconclusive RFC on color class relationships from 2016 (color (Q1075) is one of the classes appearing most often in these lists).