query-02d83d964d8aa8d47fab4bb3ba1ffd2b

rq turtle/ttl

count of games published in ROM format per year, 1980-1990 SELECT DISTINCT

?game

?gameLabel

?format

?formatLabel

?pubDate

?pubYear (COUNT(*) AS ?game_count) WHERE { ?game wdt:P31 wd:Q7889. ?game wdt:P437 ?format. ?game wdt:P577 ?pubDate

BIND (YEAR(?pubDate) AS ?pubYear) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

FILTER (?pubYear >= 1980 && ?pubYear <= 1990) } GROUP BY ?pubYear ORDER BY ASC(?pubYear)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# count of games published in ROM format per year, 1980-1990
SELECT DISTINCT
# ?game
# ?gameLabel
# ?format
# ?formatLabel
# ?pubDate
?pubYear
(COUNT(*) AS ?game_count)
WHERE { 
  ?game wdt:P31 wd:Q7889.
  ?game wdt:P437 ?format.
  ?game wdt:P577 ?pubDate

  BIND (YEAR(?pubDate) AS ?pubYear)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

  FILTER (?pubYear >= 1980 && ?pubYear <= 1990)
  }
GROUP BY ?pubYear
ORDER BY ASC(?pubYear)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v3("?format") v2("?game") v5("?game_count") v4("?pubDate") v5("?pubYear"):::projected c8(["bd:serviceParam"]):::iri c4(["wd:Q7889"]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["?pubYear >= '1980^^xsd:integer'?pubYear <= '1990^^xsd:integer'"]] f0 --> v5 v2 --"wdt:P31"--> c4 v2 --"wdt:P437"--> v3 v2 --"wdt:P577"--> v4 bind1[/"year-from-dateTime(?pubDate)"/] v4 --o bind1 bind1 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind3[/"count(*)"/] bind3 --as--o v5