query-2ab520bbbe4a573124e321c174598632
RanksRank does not match the qualifier
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 pq: <http://www.wikidata.org/prop/qualifier/>
SELECT ?statement ?pq ?value ?rank ?valid WHERE {
VALUES (?pq ?_rank ?class) {
(pq:P2241 wikibase:DeprecatedRank wd:Q27949697)
(pq:P7452 wikibase:PreferredRank wd:Q71533077)
} .
?statement ?pq ?value; wikibase:rank ?rank .
BIND( EXISTS { ?value wdt:P31/wdt:P279* ?class } AS ?valid ) .
FILTER( ?rank != ?_rank ) .
} LIMIT 5000
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?_rank")
v4("?class")
v3("?pq"):::projected
v1("?rank"):::projected
v5("?statement"):::projected
v7("?valid"):::projected
v6("?value"):::projected
f0[["?rank != ?_rank"]]
f0 --> v1
f0 --> v4
bind1[/VALUES ?_rank ?class ?pq/]
bind1-->v3
bind1-->v4
bind1-->v4
bind10(["pq:P2241"])
bind10 --> bind1
bind11(["wikibase:DeprecatedRank"])
bind11 --> bind1
bind12(["wd:Q27949697"])
bind12 --> bind1
bind13(["pq:P7452"])
bind13 --> bind1
bind14(["wikibase:PreferredRank"])
bind14 --> bind1
bind15(["wd:Q71533077"])
bind15 --> bind1
v5 -->v3--> v6
v5 --"wikibase:rank"--> v1
v6 --"wdt:P31"--> null
null --"wdt:P279"--> v4
bind2[/" "/]
subgraph bind2e0["Exists Clause"]
e0v1 --"wdt:P31"--> e0a1
e0a1 --"wdt:P279"--> e0v2
e0v2("?class"):::projected
e0v1("?value"):::projected
e0a1((" ")):::projected
end
bind2--EXISTS--> bind2e0
v6 --o bind2
null --o bind2
null --o bind2
null --o bind2
v4 --o bind2
bind2 --as--o v7