SELECT
    COUNT(value),
    SUBSTRING(value from '(.*)<') AS name,
    COALESCE(SUBSTRING(value from '<(.*)>'), value) AS id
FROM
    header
WHERE
    name = 'List-Id'
GROUP BY
    value
ORDER BY
    count DESC
;
