SharePoint List have Column like Name,Email,TotalPoints.I want to sum the TotalPoints by Grouping them by Email.After that sort the sum(TotalPoints ) in desc order,How can i do it in Power Automate

SharePoint List have Column like Name,Email,TotalPoints.I want to sum the TotalPoints by Grouping them by Email.After that sort the sum(TotalPoints ) in desc order,How can i do it in Power Automate
Compose (Test Data)
[
{"Name":"Jim","Email":"jim@example.com","Score":9},
{"Name":"Jim","Email":"jim@example.com","Score":1},
{"Name":"John","Email":"john@example.com","Score":7},
{"Name":"Jim","Email":"jim@example.com","Score":19},
{"Name":"Jane","Email":"jane@example.com","Score":1},
{"Name":"Jim","Email":"jim@example.com","Score":5},
{"Name":"John","Email":"john@example.com","Score":3},
{"Name":"Jane","Email":"jane@example.com","Score":7}
]
Select
From (Get list of unique EMails)
union(
xpath(
xml(json(concat('{"Root":{"Item":',outputs('Compose'),'}}'))),
'//Item/Email/text()'
),
json('[]')
)
Map EMail
item()
Map TotalScore (Calulate the sum of Scores per EMail)
xpath(
xml(json(concat('{"Root":{"Item":',outputs('Compose'),'}}'))),
concat('sum(//Item[Email="',item(),'"]/Score)')
)
Compose 2 (sort them desc)
reverse(sort(body('Select'), 'TotalScore'))
Result:
[
{
"EMail": "jim@example.com",
"TotalScore": 34
},
{
"EMail": "john@example.com",
"TotalScore": 10
},
{
"EMail": "jane@example.com",
"TotalScore": 8
}
]