query-158d62f23606423471bcde15579ac608

rq turtle/ttl

Films by year

Use at

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#defaultView:BarChart
PREFIX target: <http://www.wikidata.org/entity/Q294647>

SELECT
  (STR(?year_) AS ?year)
  (COUNT(?film) AS ?films)
WHERE {
   {
  SELECT
    (YEAR(MIN(?release_datetimes)) AS ?year_)
    ?film
  WHERE {
    ?film wdt:P161 target: ;
          wdt:P577 ?release_datetimes .
  }
  GROUP BY ?film
}}
GROUP BY ?year_

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?_anon_42b5416610844a34809f33a099ae9de155156") v1("?film"):::projected v6("?films") v2("?release_datetimes") v5("?year") v4("?year_"):::projected c2([http://www.wikidata.org/entity/Q294647]):::iri v1 --"wdt:P161"--> c2 v1 --"wdt:P577"--> v2 bind1[/"min(?release_datetimes)"/] v2 --o bind1 bind1 --as--o v3 bind2[/"year-from-dateTime()"/] null --o bind2 bind2 --as--o v4 bind4[/"str(?year_)"/] v4 --o bind4 bind4 --as--o v5 bind5[/"count(?film)"/] v1 --o bind5 bind5 --as--o v6