SELECT
    customer_id,
    SUM(balance) AS sum_balance
FROM
    account
GROUP BY
    customer_id
ORDER BY
    sum_balance DESC,
    customer_id;