query-7f71ab392d298b5bb86a6012e905a47c
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?property ?propertyLabel ?rank ?reason_for_preferred_rankLabel
WHERE
{
VALUES ?rank { wikibase:DeprecatedRank wikibase:NormalRank }
?statement pq:P7452 ?reason_for_preferred_rank .
?statement wikibase:rank ?rank .
OPTIONAL
{
?item ?claim ?statement .
?property wikibase:claim ?claim .
?property wikibase:statementProperty ?ps .
?statement ?ps ?value .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?claim")
v4("?item"):::projected
v6("?property"):::projected
v7("?ps")
v1("?rank"):::projected
v3("?reason_for_preferred_rank")
v2("?statement")
v8("?value")
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
bind0[/VALUES ?rank/]
bind0-->v1
bind00(["wikibase:DeprecatedRank"])
bind00 --> bind0
bind01(["wikibase:NormalRank"])
bind01 --> bind0
v2 --"pq:P7452"--> v3
v2 --"wikibase:rank"--> v1
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -->v5--> v2
v6 -."wikibase:claim".-> v5
v6 --"wikibase:statementProperty"--> v7
v2 -->v7--> v8
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end