I think it is much easier (if I correctly understand what you want):
WITH max(role.earnings) AS maxRoleEarnings, m
WHERE role.earnings = maxRoleEarnings
RETURN p.name, role.earnings, m.title
So this query gives you the highest paid actor per movie. Is that what you wanted?