query-63768f41f36f516297b326bc95510a55

rq turtle/ttl

Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age Query to find all musicians who have already died # calculate their age (full years) at death # count how many of them died at each age

SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
    ?a wdt:P31 wd:Q5 . #instance of human
    ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
    ?a p:P569/psv:P569 ?birth_date_node .
    ?a p:P570/psv:P570 ?death_date_node .
    ?birth_date_node wikibase:timeValue ?birth_date .
    ?death_date_node wikibase:timeValue ?death_date .
    FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
    BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
    # calculate the age, precisely to the day (times and timezones ignored)
}

GROUP BY ?age ORDER BY ?age

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX p: <http://www.wikidata.org/prop/>
# Query to find all musicians who have already died
   # calculate their age (full years) at death
   # count how many of them died at each age

    SELECT ?age (COUNT (DISTINCT ?a) AS ?count) WHERE {
        ?a wdt:P31 wd:Q5 . #instance of human
        ?a wdt:P106/wdt:P279 wd:Q639669 . #occupation a subclass of musician
        ?a p:P569/psv:P569 ?birth_date_node .
        ?a p:P570/psv:P570 ?death_date_node .
        ?birth_date_node wikibase:timeValue ?birth_date .
        ?death_date_node wikibase:timeValue ?death_date .
        FILTER(?age > 10 && ?age < 100) . #ignore outlyers, several of which are probably errors
        BIND( year(?death_date) - year(?birth_date) - if(month(?death_date)<month(?birth_date) || (month(?death_date)=month(?birth_date) && day(?death_date)<day(?birth_date)),1,0) as ?age )
        # calculate the age, precisely to the day (times and timezones ignored)
    }
  GROUP BY ?age
    ORDER BY ?age

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?a"):::projected v7("?age"):::projected v5("?birth_date") v3("?birth_date_node") v7("?count") v6("?death_date") v4("?death_date_node") a1((" ")) a2((" ")) a3((" ")) c4(["wd:Q5"]):::iri c7(["wd:Q639669"]):::iri f0[["?age > '10^^xsd:integer'?age < '100^^xsd:integer'"]] f0 --> v7 v2 --"p:direct/P31"--> c4 v2 --"p:direct/P106"--> a1 a1 --"p:direct/P279"--> c7 v2 --"p:P569"--> a2 a2 --"p:statement/value/P569"--> v3 v2 --"p:P570"--> a3 a3 --"p:statement/value/P570"--> v4 v3 --"wikibase:timeValue"--> v5 v4 --"wikibase:timeValue"--> v6 bind1[/"year-from-dateTime(?death_date) - year-from-dateTime(?birth_date) - if((month-from-dateTime(?death_date) < month-from-dateTime(?birth_date) || month-from-dateTime(?death_date) = month-from-dateTime(?birth_date)day-from-dateTime(?death_date) < day-from-dateTime(?birth_date)),'1^^xsd:integer','0^^xsd:integer')"/] v6 --o bind1 v5 --o bind1 bind1 --as--o v7 bind3[/"count(?a)"/] v2 --o bind3 bind3 --as--o v7