query-f196cbf309dddbd669799bece6936a81

rq turtle/ttl

Liste des institution d'archives ayant délivré (ou étant élément associé à) des identifiants externes (trié par pays) SELECT ?paysLabel ?ArchivesLabel ?Archives (COUNT(distinct (?item)) AS ?total) (GROUP_C, on entend de manière généraleONCAT(DISTINCT ?itemLabel; separator=", ") as ?items) (GROUP_CONCAT(DISTINCT ?natureLabel; separator=", ") as ?natures) WHERE { {?item wdt:P2378 ?Archives.} UNION {?item wdt:P1629 ?Archives.} ?item wdt:P31 ?nature.

OPTIONAL {?nature rdfs:label ?natureLabel. filter(lang(?natureLabel)="fr") } OPTIONAL {?item rdfs:label ?itemLabel. filter(lang(?itemLabel)="fr") } ?Archives wdt:P31/wdt:P279* wd:Q166118; wdt:P17 ?pays. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?items ?total ?natures ?ArchivesLabel ?Archives ?paysLabel ORDER BY ?paysLabel

Use at

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#>
#Liste des institution d'archives ayant délivré (ou étant élément associé à) des identifiants externes (trié par pays)
SELECT ?paysLabel ?ArchivesLabel ?Archives (COUNT(distinct (?item)) AS ?total) (GROUP_C, on entend de manière généraleONCAT(DISTINCT ?itemLabel; separator=", ") as ?items) (GROUP_CONCAT(DISTINCT ?natureLabel; separator=", ") as ?natures) 
WHERE 
{
  {?item wdt:P2378 ?Archives.}
  UNION {?item wdt:P1629 ?Archives.}
    ?item wdt:P31 ?nature.

  OPTIONAL {?nature rdfs:label ?natureLabel. filter(lang(?natureLabel)="fr") }
  OPTIONAL {?item rdfs:label ?itemLabel. filter(lang(?itemLabel)="fr") }
  ?Archives wdt:P31/wdt:P279* wd:Q166118;
            wdt:P17 ?pays.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?items ?total ?natures ?ArchivesLabel ?Archives ?paysLabel
ORDER BY ?paysLabel

Query found at