Request: the average score per team
Input:
team: A
score: 10
team: A
score: 20
team: B
score: 5
jq program: group_by(.team) | map({team: .[0].team, avg: ((map(.score) | add) / length)})
Output:
team: A
avg: 15
team: B
avg: 5