Special scoring / rating system possible to create with sailwave?

Hello to all,
i´m new here and i first like to introduce me. My name is Thorsten, and i´m a Windsurfer from Germany, working in race comitee or jury from time to time.
I already use sailwave for scoring events and think to have understood the basics.

Now for the problem:

in Germany we have a race series called "Surf-Bundesliga" which is a bit similar to the soccer-league.
It is a Team challenge where Clubs can have one ore more Teams consisting by a minimum of two helmsmen.

Scoring will handle as follows:
Every race (is this correct for one event with lets say 5runs/starts in a series of events ?) will be scored in the usual way using low point system. Now the complicated part:
to build the league table, the two best results per team for every start have to be added, the other results of a team get discarded. These points per Start will be summed up per Team
for the whole event. The team with the lowest points will be rewarded 20Points in the league table, the second team will earn 18points, the third 17 points and so on.

Maybe there is already a comparable scheme out there for scoring?
Otherwise my question is would it be possible to construct this with the inbuild capabilities of sailwave or would it be wiser to do an external script/program for this task?

Any Help appreciated,

best regards, Thorsten