query-32dbbf1911fb16f1d415bebc653d2877

rq turtle/ttl

title:Things in the Matenadaran collection SELECT ?item ?itemLabel (GROUP_CONCAT(?typeLabel; separator=", ") AS ?thing) (YEAR(?date) AS ?year) ?image WHERE { ?item wdt:P195 wd:Q1322278 OPTIONAL {?item wdt:P31 ?type} OPTIONAL {?item wdt:P571 ?date} OPTIONAL {?item wdt:P18 ?image} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,hy". ?item rdfs:label ?itemLabel. ?type rdfs:label ?typeLabel} } GROUP BY ?item ?itemLabel ?date ?image ORDER BY DESC(?image) ?year

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#>
#title:Things in the Matenadaran collection
SELECT ?item ?itemLabel (GROUP_CONCAT(?typeLabel; separator=", ") AS ?thing) (YEAR(?date) AS ?year) ?image WHERE {
  ?item wdt:P195 wd:Q1322278
  OPTIONAL {?item wdt:P31 ?type}
  OPTIONAL {?item wdt:P571 ?date}
  OPTIONAL {?item wdt:P18 ?image}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,hy".
                          ?item rdfs:label ?itemLabel. ?type rdfs:label ?typeLabel}
} GROUP BY ?item ?itemLabel ?date ?image
ORDER BY DESC(?image) ?year

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?date"):::projected v1("?image"):::projected v3("?item"):::projected v6("?itemLabel"):::projected v8("?thing") v4("?type") v7("?typeLabel"):::projected v9("?year") c2(["wd:Q1322278"]):::iri c7(["bd:serviceParam"]):::iri c9(["#91;AUTO_LANGUAGE#93;,en,hy"]):::literal v3 --"wdt:P195"--> c2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P31".-> v4 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P571".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P18".-> v1 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 v3 --"rdfs:label"--> v6 v4 --"rdfs:label"--> v7 end bind1[/"?typeLabel"/] v7 --o bind1 bind1 --as--o v8 bind2[/"year-from-dateTime(?date)"/] v5 --o bind2 bind2 --as--o v9