query-af2aca368984481f9c047ba6880010fc

rq turtle/ttl

Liste des institution d'archives ayant délivré (ou étant élément associé à) des identifiants externes (trié par pays). Moins les cinémathèques et en affichant leurs natures. SELECT ?paysLabel ?ArchivesLabel ?Archives (GROUP_CONCAT(DISTINCT ?natureArchivesLabel; separator=", ") as ?nal) (COUNT(distinct (?item)) AS ?total) (GROUP_CONCAT(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:P31 ?natureArchives; wdt:P17 ?pays. OPTIONAL {?natureArchives rdfs:label ?natureArchivesLabel. filter(lang(?natureArchivesLabel)="fr") } MINUS { ?Archives wdt:P31 wd:Q1352795} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?items ?total ?natures ?ArchivesLabel ?Archives ?paysLabel ?nal 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). Moins les cinémathèques et en affichant leurs natures.
SELECT ?paysLabel ?ArchivesLabel ?Archives (GROUP_CONCAT(DISTINCT ?natureArchivesLabel; separator=", ") as ?nal)  (COUNT(distinct (?item)) AS ?total) (GROUP_CONCAT(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:P31 ?natureArchives;
            wdt:P17 ?pays.
  OPTIONAL {?natureArchives rdfs:label ?natureArchivesLabel. filter(lang(?natureArchivesLabel)="fr") }
  MINUS { ?Archives wdt:P31 wd:Q1352795}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?items ?total ?natures ?ArchivesLabel ?Archives ?paysLabel ?nal
ORDER BY ?paysLabel

Query found at