title: Order model by sum of child attribute value
body: <p>I have Teams and teams have multiple memberships. Each memberships has points. I want to order teams by the sum of those membership points.</p>
  
  <p>Example:</p>
  
  <p>Team awesome | 10 points</p>
  
  <p>Team good    | 8 points</p>
  
  <p>Because:</p>
  
  <p><strong>Team awesome</strong></p>
  
  <ul>
  <li>membership 1, points: 5</li>
  <li>membership 2, points: 5</li>
  </ul>
  
  <p><strong>Team good:</strong></p>
  
  <ul>
  <li>membership 1, points: 5</li>
  <li>membership 2, points: 3</li>
  </ul>
  
  <p>But i cant seem to find a solution.</p>