Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
337 B
3
Indexable
SELECT
    First,
    Last,
    (CASE
        WHEN Died IS NULL THEN
            (EXTRACT(YEAR FROM CURRENT_DATE) - EXTRACT(YEAR FROM Born))
        ELSE
            (Died - Born)
    END) AS YearsLived
FROM Composer
WHERE Born BETWEEN '1600-01-01' AND '1699-12-31'
ORDER BY
    YearsLived ASC,
    Last ASC,
    First ASC;