query-aa036a8bcff310ae395cdd1a28304a6f
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
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 ?item ?itemLabel ?lang ?langLabel ?rank
WHERE
{
?item p:P1630 ?stat.
?stat ps:P1630 ?f_url.
optional {?stat pq:P407 ?lang.}
?stat wikibase:rank ?rank.
?item p:P1630 ?stat2.
filter(str(?stat) != str(?stat2))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?itemLabel ?rank ?langLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v7("?f_url")
v6("?item"):::projected
v1("?itemLabel"):::projected
v8("?lang"):::projected
v3("?langLabel"):::projected
v2("?rank"):::projected
v4("?stat")
v5("?stat2")
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["str(?stat) != str(?stat2)"]]
f0 --> v4
f0 --> v5
v6 --"p:P1630"--> v4
v4 --"p:statement/P1630"--> v7
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P407".-> v8
end
v4 --"wikibase:rank"--> v2
v6 --"p:P1630"--> v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end