More "order by" for user query (in query Loop): order by orders count and total orders price

Hi bricks team

It would be great if we could sort users by the number of orders and the total amount of their orders in query loop.

For example we have 4 users. Alex, Thomas, Ariel and Nila.

Alex has paid $5,500 for 4 orders.
Thomas has paid $7,500 for 1 orders.
Ariel has paid $2,200 for 3 orders.
Nila has paid $6,300 for 5 orders.

Order by orders count

  1. Nila
  2. Alex
  3. Ariel
  4. Thomas

Order by total orders price

  1. Thomas
  2. Nila
  3. Alex
  4. Ariel

Thank you