query-ec2894981e806bc5b009e0830cbe64cb

rq turtle/ttl

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

afficher le lieu où est située l'institution.

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

SELECT ?institution ?institutionLabel ?lieuLabel (COUNT(?item) AS ?total) WHERE { ?item wdt:P485 ?institution . #les éléments doivent disposé de la propriété "archivé par" qui renvoie à une institution. ?institution wdt:P17 wd:Q142; #l'institution doit être localisée en France wdt:P131 ?lieu. #localisation administrative de l'institution SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?institution ?institutionLabel ?lieuLabel ORDER BY DESC (?total) ?lieuLabel

Use at

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#>
#afficher le nombre d'éléments disposant de la propriété "archivé par" (P485) par institution française
#afficher le lieu où est située l'institution.
#classer les institution par ordre de nombre d'éléments décroissant.
SELECT ?institution ?institutionLabel ?lieuLabel (COUNT(?item) AS ?total) 
WHERE 
{
  ?item wdt:P485 ?institution . #les éléments doivent disposé de la propriété "archivé par" qui renvoie à une institution.
  ?institution wdt:P17 wd:Q142; #l'institution doit être localisée en France
               wdt:P131 ?lieu. #localisation administrative de l'institution
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?institution ?institutionLabel ?lieuLabel
ORDER BY DESC (?total) ?lieuLabel

Query found at

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