query-d09aa3d72e8e4865e1c6edc98b7182b0
Steak
Use at
- https://query.wikidata.org/sparql
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
SELECT ?year (COUNT(*) AS ?cnt) (FLOOR(AVG(?year - YEAR(?dob))) AS ?avg_age) WHERE {
?item p:P2962 [ ps:P2962 wd:Q105269; pq:P580 ?start ]; wdt:P569 ?dob .
BIND(YEAR(?start) AS ?year) .
} GROUP BY ?year ORDER BY ASC(?year)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?avg_age")
v5("?cnt")
v4("?dob")
v3("?item")
v2("?start")
v5("?year"):::projected
a1((" "))
c2(["wd:Q105269"]):::iri
a1 --"p:statement/P2962"--> c2
a1 --"p:qualifier/P580"--> v2
v3 --"p:P2962"--> a1
v3 --"p:direct/P569"--> v4
bind0[/"year-from-dateTime(?start)"/]
v2 --o bind0
bind0 --as--o v5
bind3[/"count(*)"/]
bind3 --as--o v5
bind4[/"numeric-floor()"/]
null --o bind4
bind4 --as--o v6