query-8bf777b9b9d74c486fa639677c902f0f
How to change that so to not include items with P4812 with value in deprecated rank. Two cases: a) items with P4812 with one value in deprecated rank: not included. b) items with P4812 with one value in deprecated rank and one value not in deprecated rank: included with the second value. 14:21, 3 September 2018 (UTC)) talk (Xaris333 Only 4 digits
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?P4812value
WHERE {
?item p:P4812 [ ps:P4812 ?P4812value; wikibase:rank ?rank ] .
FILTER(?rank != wikibase:DeprecatedRank) .
SERVICE wikibase:label { bd:serviceParam wikibase:language 'el' }
}
ORDER BY DESC(?P4812value)
Query found at
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/09
- https://www.wikidata.org/wiki/Wikidata:Request_a_query/Archive/2018/12
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?P4812value"):::projected
v3("?item"):::projected
v2("?rank")
a1((" "))
c6(["bd:serviceParam"]):::iri
c8(["el"]):::literal
f0[["?rank != 'wikibase:DeprecatedRank'"]]
f0 --> v2
a1 --"p:statement/P4812"--> v1
a1 --"wikibase:rank"--> v2
v3 --"p:P4812"--> a1
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end