query-85ba5ca8a6e42669bbefca19be3e2570

rq turtle/ttl

GROUP CONCATRegroupement des libellés

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#>
SELECT ?oeuvre ?oeuvreLabel (COUNT(?edition) AS ?nbEdition) (GROUP_CONCAT(?editionLabel; separator="| ") as ?editions) WHERE {
  ?oeuvre wdt:P747 ?edition ; wdt:P50 wd:Q535 .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". 
                         ?edition rdfs:label ?editionLabel.
                         ?oeuvre rdfs:label ?oeuvreLabel }
}
GROUP BY ?oeuvre ?oeuvreLabel
ORDER BY DESC(?nbEdition)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?edition"):::projected v4("?editionLabel"):::projected v6("?editions") v6("?nbEdition") v2("?oeuvre"):::projected v5("?oeuvreLabel"):::projected c5(["bd:serviceParam"]):::iri c3(["wd:Q535"]):::iri c7(["#91;AUTO_LANGUAGE#93;,en"]):::literal v2 --"wdt:P747"--> v3 v2 --"wdt:P50"--> c3 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c5 --"wikibase:language"--> c7 v3 --"rdfs:label"--> v4 v2 --"rdfs:label"--> v5 end bind2[/"count(?edition)"/] v3 --o bind2 bind2 --as--o v6 bind3[/"?editionLabel"/] v4 --o bind3 bind3 --as--o v6