query-5ffed98e027f41b025409d1add09a5c8
KM Sorting out of the SPARQL below. The code is still the same but sorting works wrong by results of the bot. Q55723908 should be behind Q56241795. distanz and de:Benutzer:Derzno/Bilder between the bot result provided in German Wikipedia KMCould you please check the sorting of column
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pqv: <http://www.wikidata.org/prop/qualifier/value/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?befindet_sich_entlang ?befindet_sich_entlangLabel ?distanz ?distanzEinheitLabel ?bezugspunkt ?bezugspunktLabel WHERE {
BIND(wd:Q445400 AS ?befindet_sich_entlang) .
?item p:P795 ?statementNode .
?statementNode ps:P795 ?befindet_sich_entlang .
OPTIONAL {
?statementNode pqv:P2043 ?distanzNode .
?distanzNode wikibase:quantityAmount ?distanz .
?distanzNode wikibase:quantityUnit ?distanzEinheit .
}
OPTIONAL {
?statementNode pq:P2210 ?bezugspunkt .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language 'de,en' }
}
ORDER BY ?distanz
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?befindet_sich_entlang"):::projected
v7("?bezugspunkt"):::projected
v1("?distanz"):::projected
v6("?distanzEinheit")
v5("?distanzNode")
v3("?item"):::projected
v4("?statementNode")
c8(["bd:serviceParam"]):::iri
c10(["de,en"]):::literal
bind0[/"'wd:Q445400'"/]
bind0 --as--o v2
v3 --"p:P795"--> v4
v4 --"p:statement/P795"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/value/P2043".-> v5
v5 --"wikibase:quantityAmount"--> v1
v5 --"wikibase:quantityUnit"--> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v4 -."p:qualifier/P2210".-> v7
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end