Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
261 B
5
Indexable
SELECT
    Century,
    AVG(YearsLived) AS AverageAge,
    COUNT(*) AS ComposerCount
FROM (
    SELECT
        1 + FLOOR(Born / 100) AS Century,
        (Died - Born) AS YearsLived
    FROM Composer
) ComposerData
GROUP BY Century
ORDER BY Century;