query-0de0ec6d2e99f73235dcbf3c173ca694
TODO
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 (GROUP_CONCAT(DISTINCT ?twitter; separator=", ") as ?twit) (COUNT(distinct (?item)) AS ?total) (GROUP_CONCAT(DISTINCT(?LieuLabel); separator=", ") as ?Lieux) (GROUP_CONCAT(DISTINCT(?departementLabel); separator=", ") as ?departements) ?pop
WHERE
{
?institution wdt:P31/wdt:P279* wd:Q166118;
wdt:P17 wd:Q142.
OPTIONAL {?institution wdt:P2002 ?twitter .}
OPTIONAL {
?institution wdt:P131 ?Lieu.
OPTIONAL {?Lieu rdfs:label ?LieuLabel. filter(lang(?LieuLabel)="fr") }
?Lieu wdt:P131 ?departement.
?departement wdt:P31 wd:Q6465;
wdt:P1082 ?pop.
OPTIONAL {?departement rdfs:label ?departementLabel. filter(lang(?departementLabel)="fr") }
}
OPTIONAL {
?item wdt:P485 ?institution .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".}
}
group by ?institution ?institutionLabel ?lieux ?departements ?pop
HAVING (?total < 5)
ORDER BY ?institution