query-43829697cf8498b36732b2d8b81b2205

rq turtle/ttl

afficher le nombre d'éléments disposant de la propriété "archivé par" (P485) par institution

afficher le pays où est situé l'institution.

classer les institution par ordre de nombre d'éléments décroissant.

SELECT ?institution ?institutionLabel ?paysLabel (COUNT(?item) AS ?total) WHERE { ?item wdt:P485 ?institution . OPTIONAL {?institution wdt:P17 ?pays .} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?institution ?institutionLabel ?paysLabel ORDER BY DESC (?total)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#afficher le nombre d'éléments disposant de la propriété "archivé par" (P485) par institution
#afficher le pays où est situé l'institution.
#classer les institution par ordre de nombre d'éléments décroissant.
SELECT ?institution ?institutionLabel ?paysLabel (COUNT(?item) AS ?total) 
WHERE 
{
  ?item wdt:P485 ?institution .
  OPTIONAL {?institution wdt:P17 ?pays .}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?institution ?institutionLabel ?paysLabel
ORDER BY DESC (?total)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?institution"):::projected v2("?item"):::projected v4("?pays") v5("?total") c4(["bd:serviceParam"]):::iri c6(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P485"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P17".-> v4 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c4 --"wikibase:language"--> c6 end bind1[/"count(?item)"/] v2 --o bind1 bind1 --as--o v5