query-f2862c9509c98e8f8d3233f9f3afbc47
number of NYT obituaries per year SELECT ?year (COUNT(?q) AS ?count) WHERE { SELECT DISTINCT ?q (YEAR(?date) AS ?year) (MONTH(?date) AS ?month) WHERE { ?q wdt:P31 wd:Q309481 ; wdt:P1433 wd:Q9684 . ?q wdt:P577 ?date. FILTER(?date >= "2006-01-01"^^xsd:dateTime && ?date < "2024-01-01"^^xsd:dateTime) . } } GROUP BY ?year ORDER BY ?year
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
# number of NYT obituaries per year
SELECT ?year (COUNT(?q) AS ?count) WHERE {
SELECT DISTINCT ?q (YEAR(?date) AS ?year) (MONTH(?date) AS ?month) WHERE {
?q wdt:P31 wd:Q309481 ; wdt:P1433 wd:Q9684 .
?q wdt:P577 ?date.
FILTER(?date >= "2006-01-01"^^xsd:date && ?date < "2024-01-01"^^xsd:dat) .
}
}
GROUP BY ?year
ORDER BY ?year
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?count")
v2("?date")
v4("?month")
v3("?q"):::projected
v4("?year"):::projected
c6(["wd:Q9684"]):::iri
c4(["wd:Q309481"]):::iri
f0[["?date >= '2006-01-01^^xsd:date'?date < s2024-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'"]]
f0 --> v2
v3 --"wdt:P31"--> c4
v3 --"wdt:P1433"--> c6
v3 --"wdt:P577"--> v2
bind1[/"year-from-dateTime(?date)"/]
v2 --o bind1
bind1 --as--o v4
bind2[/"month-from-dateTime(?date)"/]
v2 --o bind2
bind2 --as--o v4
bind4[/"count(?q)"/]
v3 --o bind4
bind4 --as--o v5