query-062101b8f3ccba529e0ea2754575d6b8
Comprovacio que tots els elements que tenen codi IDESCAT de 13 dÃgits acabats en 00 siguin ESP
Use at
- https://query.wikidata.org/sparql
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 ?item ?itemLabel ?idescat ?muniLabel WHERE {
?item wdt:P4335 ?idescat
FILTER (STRLEN(?idescat)=13)
MINUS { ?item wdt:P31 wd:Q3055118 }
?item wdt:P131 ?muni.
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;
v1("?idescat"):::projected
v2("?item"):::projected
v3("?muni")
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
c4(["wd:Q3055118"]):::iri
f0[["string-length(?idescat) = '13^^xsd:integer'"]]
f0 --> v1
v2 --"wdt:P4335"--> v1
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v2 --"wdt:P31"--> c4
end
v2 --"wdt:P131"--> v3
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end