query-8e421fc37907336f1efdafd0a619c51c

rq turtle/ttl

Artworks per decade

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
#defaultView:BarChart
SELECT
  (CONCAT(?year_, "0") AS ?year)
  (COUNT(?artwork) AS ?artworks)
WHERE {
  ?artwork wdt:P195 wd:Q2982867 ;
           wdt:P571 ?datetime .
  BIND(SUBSTR(STR(YEAR(?datetime)), 1, 3) AS ?year_)
}
GROUP BY ?year_

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?artwork"):::projected v5("?artworks") v2("?datetime") v4("?year") v3("?year_"):::projected c2(["wd:Q2982867"]):::iri v1 --"wdt:P195"--> c2 v1 --"wdt:P571"--> v2 bind0[/"substring(str(year-from-dateTime(?datetime)),'1^^xsd:integer','3^^xsd:integer')"/] v2 --o bind0 bind0 --as--o v3 bind2[/"concat(?year_,'0')"/] v3 --o bind2 bind2 --as--o v4 bind3[/"count(?artwork)"/] v1 --o bind3 bind3 --as--o v5