query-5d3a85cebb7bc93c2e912265596e0c9d
Consulta SPARQL per detectar codis INE que no són ESP
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 ?ine ?coor WHERE {
?item wdt:P772 ?ine.
FILTER (STRLEN(?ine)=11) #només codis de 11 dígits
FILTER (!STRENDS(?ine,"00"))
?item wdt:P625 ?coor
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?coor"):::projected
v1("?ine"):::projected
v2("?item"):::projected
c6(["bd:serviceParam"]):::iri
c8(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["not ends-with(?ine,'00')"]]
f0 --> v1
f1[["string-length(?ine) = '11^^xsd:integer'"]]
f1 --> v1
v2 --"wdt:P772"--> v1
v2 --"wdt:P625"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c6 --"wikibase:language"--> c8
end