query-0c43bcbe857fb0a72e782c5f84277c1a
Formules magiquesMembres du CODHOS par nombre de "archivé par"
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?institution ?institutionLabel (COUNT(distinct ?item) AS ?total) (GROUP_CONCAT(DISTINCT(?LieuLabel); separator=", ") as ?Lieux)
WHERE
{
?institution wdt:P463 wd:Q2982800.
OPTIONAL {?institution wdt:P131 ?Lieu.
OPTIONAL {?Lieu rdfs:label ??LieuLabel. filter(lang(?LieuLabel)="fr") }
}
OPTIONAL {
?item wdt:P485 ?institution .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fr,en".}
}
group by ?institution ?institutionLabel
ORDER BY DESC (?total) ?institutionLabel
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?Lieu")
v4("?LieuLabel"):::projected
v7("?Lieux")
v3("?institution"):::projected
v2("?institutionLabel"):::projected
v6("?item"):::projected
v7("?total")
c2(["wd:Q2982800"]):::iri
c8(["bd:serviceParam"]):::iri
c10(["#91;AUTO_LANGUAGE#93;,fr,en"]):::literal
v3 --"wdt:P463"--> c2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P131".-> v5
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v5 -."rdfs:label".-> v4
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
end
union0r <== or ==> union0l
end
end
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v6 -."wdt:P485".-> v3
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c8 --"wikibase:language"--> c10
end
bind2[/"count(?item)"/]
v6 --o bind2
bind2 --as--o v7
bind3[/"?LieuLabel"/]
v4 --o bind3
bind3 --as--o v7