Make statistics on the best player

From the text file Basketball.txt, get the individual score data of a team in a few games, and select the players whose scores are all among the top 3 in each game.

Solution:

A
1
=file("Basketball.txt").import@t()
2
=A1.derive(Rank)
3
=A2.group(Game)
4
=A3.((ScoreAll=~.(PTS),~.run(Rank=ScoreAll.ranki(PTS))))
5
=A4.(~.select(Rank<=3).(PLAYER))
6
=A5.isect()

The computation in A6 is shown below:

Because the scores may be the same, simply sorting and retrieving the top 3 records cannot get the desired rankings.