query-98d17eba14cef7e25eb777fd5721d4a6
TTRPGs that cites at least one TTRPG (per year)Biases by the partial indexation
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#defaultView:BarChart
PREFIX target: <http://www.wikidata.org/entity/Q1643932>
SELECT ?year (count(distinct ?citing_work) as ?count) ?kind WHERE {
?work wdt:P31 target: .
?citing_work wdt:P2860 ?work .
bind(if (exists { ?citing_work wdt:P31 target: }, "", "") as ?kind)
?citing_work wdt:P577 ?date .
BIND(str(YEAR(?date)) AS ?year)
} group by ?year ?kind
order by desc(?year)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?citing_work"):::projected
v6("?count")
v5("?date")
v4("?kind"):::projected
v2("?work")
v6("?year"):::projected
c2([http://www.wikidata.org/entity/Q1643932]):::iri
v2 --"wdt:P31"--> c2
v3 --"wdt:P2860"--> v2
v3 --"wdt:P31"--> c2
bind0[/"if( ,'','')"/]
subgraph bind0e0["Exists Clause"]
e0v1 --"wdt:P31"--> e0c2
e0v1("?citing_work"):::projected
e0c2([http://www.wikidata.org/entity/Q1643932]):::iri
end
bind0--EXISTS--> bind0e0
v3 --o bind0
c1 --o bind0
c2 --o bind0
bind0 --as--o v4
v3 --"wdt:P577"--> v5
bind1[/"str(year-from-dateTime(?date))"/]
v5 --o bind1
bind1 --as--o v6
bind3[/"count(?citing_work)"/]
v3 --o bind3
bind3 --as--o v6