query-897b1819a759d0ea988389a6dfe157f9
Better query for P301 inverse constraint?: new-style sparql query (but that page only lists the first few thousand). The Wikidata:Database_reports/Constraint_violations/P301#Inverse”' constraint, of which there are currently 27k according to (P910)topic's main category has a 'Inverse property of “(P301)category's main topic
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wds: <http://www.wikidata.org/entity/statement/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel WHERE {
?statement wikibase:hasViolationForConstraint wds:P301-0EC7969D-436B-4365-B6B5-59454795403E .
?item ?p ?statement .
FILTER( ?item NOT IN ( wd:Q4115189, wd:Q13406268, wd:Q15397819 ) ) .
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;
v1("?item"):::projected
v3("?p")
v2("?statement")
c7(["bd:serviceParam"]):::iri
c5(["wd:statement/P301-0EC7969D-436B-4365-B6B5-59454795403E"]):::iri
c9(["en"]):::literal
f0[["?item != 'wd:Q4115189'?item != 'wd:Q13406268'?item != 'wd:Q15397819'"]]
f0 --> v1
v2 --"wikibase:hasViolationForConstraint"--> c5
v1 -->v3--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end