Return the branch name as branch and total_cents (the sum of balance_cents of its open accounts) for each branch, sorted by total_cents from high to low.
Hint 1
Join accounts to branches, filter status = 'open', group by branch.
Reference solution
SELECT b.name AS branch, SUM(a.balance_cents) AS total_cents
FROM accounts AS a
JOIN branches AS b ON b.branch_id = a.branch_id
WHERE a.status = 'open'
GROUP BY b.branch_id, b.name
ORDER BY total_cents DESC;
Join first, filter, then group: the database does the rows in that order. The filter on a.status removes rows before they are summed. Grouping by b.branch_id as well as the name is the safe habit: the id is guaranteed unique, a name may not be.