query-e6d73eb715803f5956089e06dc97e6d9
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel (xsd:decimal(REPLACE(str(?itemLabel),"route impériale ","")) as ?num) ?num_rn {
?item_rn (wdt:P31|wdt:P16) wd:Q1426271 ; wdt:P1365 ?item ; wdt:P1824 ?rn .
?item wdt:P31 wd:Q56582861 .
BIND(xsd:decimal(REPLACE(str(?rn),"N","")) as ?num_rn) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" } .
} ORDER BY ?num
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?item"):::projected
v2("?item_rn")
v6("?num")
v5("?num_rn"):::projected
v4("?rn")
c8(["bd:serviceParam"]):::iri
c2(["wd:Q1426271"]):::iri
c6(["wd:Q56582861"]):::iri
c10(["fr"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P16"--> c2
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v2 --"wdt:P31"--> c2
end
union0r <== or ==> union0l
end
v2 --"wdt:P1365"--> v3
v2 --"wdt:P1824"--> v4
v3 --"wdt:P31"--> c6
bind0[/"http://www.w3.org/2001/XMLSchema#decimal(replace(str(?rn),'N',''))"/]
v4 --o bind0
bind0 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind1[/"http://www.w3.org/2001/XMLSchema#decimal(replace(str(?itemLabel),'route impériale ',''))"/]
null --o bind1
bind1 --as--o v6