query-cc52a9ec3dcb7e4b29838ab3b8289246
Constraint violations inverse constraint violations where the linked item is a Wikimedia list: (P301)category's main topic
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 ?item ?category ?itemLabel ?categoryLabel
WHERE
{
?item wdt:P31 wd:Q13406463.
?category wdt:P301 ?item
FILTER NOT EXISTS { ?item wdt:P910 ?category }
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("?category"):::projected
v1("?item"):::projected
c6(["bd:serviceParam"]):::iri
c8(["en"]):::literal
c3(["wd:Q13406463"]):::iri
f0[["not "]]
subgraph f0e0["Exists Clause"]
e0v1 --"wdt:P910"--> e0v2
e0v2("?category"):::projected
e0v1("?item"):::projected
end
f0--EXISTS--> f0e0
f0 --> v1
f0 --> c1
f0 --> v2
v1 --"wdt:P910"--> v2
v1 --"wdt:P31"--> c3
v2 --"wdt:P301"--> v1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end