query-5032b47ded50f5f9e1f3c74aa6c98b3c

rq turtle/ttl

Elements segons nombre de codis IDESCAT SELECT ?lloc ?llocLabel (COUNT(DISTINCT(?idescat)) AS ?numidescat) WHERE { ?lloc wdt:P4335 ?idescat. FILTER (STRLEN(?idescat)=13) SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,en,es,fr".}
} GROUP BY ?lloc ?llocLabel ORDER BY DESC(?numidescat) ?llocLabel

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Elements segons nombre de codis IDESCAT
SELECT ?lloc ?llocLabel (COUNT(DISTINCT(?idescat)) AS ?numidescat) WHERE {
  ?lloc wdt:P4335 ?idescat.
  FILTER (STRLEN(?idescat)=13)
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],ca,en,es,fr".}   
}
GROUP BY ?lloc ?llocLabel
ORDER BY DESC(?numidescat) ?llocLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?idescat"):::projected v4("?lloc"):::projected v2("?llocLabel"):::projected v5("?numidescat") c4(["bd:serviceParam"]):::iri c6(["#91;AUTO_LANGUAGE#93;,ca,en,es,fr"]):::literal f0[["string-length(?idescat) = '13^^xsd:integer'"]] f0 --> v3 v4 --"wdt:P4335"--> v3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end bind2[/"count(?idescat)"/] v3 --o bind2 bind2 --as--o v5