query-4f8ec60435263323159e0abb45205789
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 WHERE {
?item wdt:P772 ?id .
FILTER(STRLEN(?id) = 11) # ?id string must be 11 digits
FILTER(SUBSTR(?id,6,2)!="00") # 6th & 7th digits must not be 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
c7(["bd:serviceParam"]):::iri
c9(["es"]):::literal
f0[["substring(?id,'6^^xsd:integer','2^^xsd:integer') != '00'"]]
f0 --> v2
f1[["string-length(?id) = '11^^xsd:integer'"]]
f1 --> v2
v3 --"wdt:P772"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end