query-f98d92eaef9774d4e25d8804639893b7
TODO
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?id ?rendering WHERE {
?item wdt:P772 ?id .
FILTER(STRLEN(?id) = 11)
bind(REPLACE(?id, "(\\d{5})\\d\\d(\\d{2})\\d\\d", "$100$200") as ?rendering) #change the 6th & 7th, and the 10th & 11th, to 00
SERVICE wikibase:label { bd:serviceParam wikibase:language "es". }
} order by ?itemLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?id"):::projected
v3("?item"):::projected
v1("?itemLabel"):::projected
v4("?rendering"):::projected
c4(["bd:serviceParam"]):::iri
c6(["es"]):::literal
f0[["string-length(?id) = '11^^xsd:integer'"]]
f0 --> v2
v3 --"wdt:P772"--> v2
bind1[/"replace(?id,'(\d{5})\d\d(\d{2})\d\d','$100$200')"/]
v2 --o bind1
bind1 --as--o v4
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c4 --"wikibase:language"--> c6
end