query-6672c26f1e6571e0b10e6286bcbb21fd
Altres Consultes https://www.idescat.cat/codis/?cin=0&nom=&ambit=a&cic=0&codi=171997&pobi=&pobf=&id=50&n=22&inf=c&t=01-01-2023Per trobar tot l'arbre de poblacions d'un municipi a partir del seu codi: IDESCAT: Per trobar ref:ine a OSM [out:csv("ref:ine",name,place,wikidata)] [bbox:{{bbox}}]; ( node[place=locality ] ; ); out meta ; Correspondències municipals OSM-WD/VP: Per trobar admin-centre amb wikidata diferent de la relació corresponent: rel[wikidata]"admin_level"="8"; // get all relations with wikidata tag in current bounding box and admin_level=8 foreach -> .rel( // process each relation one by one // find out all node members where the wikidata tag does not match the relation's wikidata tag nodewikidata(if: t["wikidata"] != rel.u(t["wikidata"]))->.llista; // if some node members could be found, print the current relation first... rel.rel(if:llista.count(nodes) > 0); out center; // ... followed by all nodes with unmatching wikidata tag .llista out tags; ); Per trobar refs ine o idescat a WD
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?codi WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?item p:P772/ps:P772 ?codi.
FILTER(STRLEN(?codi) = 11)
FILTER(SUBSTR(?codi,1,2)="17")
}