query-695d7ab1424b231257f2fd2096e4609c
Redundancies in (value) type constraint definitions
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 ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?property ?propertyLabel ?constrLabel ?class1Label ?class2Label {
VALUES ?constr { wd:Q21503250 wd:Q21510865 } .
?property p:P2302 [ ps:P2302 ?constr; pq:P2308 ?class1, ?class2 ] .
FILTER( ?class1 != ?class2 ) .
?class1 wdt:P279+ ?class2 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } .
} ORDER BY ?propertyLabel ?constrLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?class1")
v4("?class2")
v5("?constr")
v2("?constrLabel"):::projected
v6("?property"):::projected
v1("?propertyLabel"):::projected
a1((" "))
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?class1 != ?class2"]]
f0 --> v3
f0 --> v4
bind1[/VALUES ?constr/]
bind1-->v5
bind10(["wd:Q21503250"])
bind10 --> bind1
bind11(["wd:Q21510865"])
bind11 --> bind1
a1 --"p:statement/P2302"--> v5
a1 --"p:qualifier/P2308"--> v3
a1 --"p:qualifier/P2308"--> v4
v6 --"p:P2302"--> a1
v3 --"p:direct/P279"--> v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end