query-17d66ec17b55f616456708657fd7acbe

rq turtle/ttl

TODO

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
  ?work ?workLabel (GROUP_CONCAT(DISTINCT ?instanceLabel; separator=", ") AS ?inst)
  (GROUP_CONCAT(DISTINCT STR(YEAR(?date)); separator=", ") AS ?date)
  (GROUP_CONCAT(DISTINCT ?materialLabel; separator=", ") AS ?mater) (SAMPLE(?image) AS ?image)
WHERE {
  ?work wdt:P170 wd:Q5547;
        wdt:P31 ?instance;
        wdt:P571 ?date;
        wdt:P186 ?material;
        wdt:P18 ?image .
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en,fr" .
    ?work rdfs:label ?workLabel .
    ?instance rdfs:label ?instanceLabel .
    ?material rdfs:label ?materialLabel .
  } .
} GROUP BY ?work ?workLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v10("?date"):::projected v11("?image"):::projected v9("?inst") v2("?instance") v7("?instanceLabel"):::projected v10("?mater") v4("?material") v8("?materialLabel"):::projected v1("?work"):::projected v6("?workLabel"):::projected c8(["bd:serviceParam"]):::iri c2(["wd:Q5547"]):::iri c10(["en,fr"]):::literal v1 --"wdt:P170"--> c2 v1 --"wdt:P31"--> v2 v1 --"wdt:P571"--> v10 v1 --"wdt:P186"--> v4 v1 --"wdt:P18"--> v11 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 v1 --"rdfs:label"--> v6 v2 --"rdfs:label"--> v7 v4 --"rdfs:label"--> v8 end bind4[/"?instanceLabel"/] v7 --o bind4 bind4 --as--o v9 bind5[/"str(year-from-dateTime(?date))"/] v10 --o bind5 bind5 --as--o v10 bind6[/"?materialLabel"/] v8 --o bind6 bind6 --as--o v10 bind7[/"sample(?image)"/] v11 --o bind7 bind7 --as--o v11