A team's win rate and counts
compute_aggregateWorks out one number for any covered team, in any league or season, in code from its recorded lines: win_rate, win_count, loss_count or match_count. Call it whenever you would state a count, an average or a win rate, and quote its value exactly rather than working one out. With no phase it counts the playoffs and sectionals too, so pass phase:'regular season' for a league record alone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Which number to compute, over the lines the team played: 'win_rate' (the share of them won, from 0 to 1), 'win_count' (lines won), 'loss_count' (lines lost) or 'match_count' (lines played). | |
| team | Yes | Team key or display name. Or the team's Desk page link or number. | |
| asked | No | The person's question word for word, never paraphrased. Leave it out rather than invent one. | |
| phase | No | Optional competition phase: 'sectionals', 'playoffs', 'postseason', or 'regular season'. Pass it when the member names one, or when they ask for a LEAGUE record — a sectional match keeps its REGULAR-SEASON league name in our data, so there is no other way to separate them. Omit to count every phase. | |
| season | No | Optional season year to filter to, e.g. 2026 | |
| includeAllSeasons | No | Set true ONLY when the user explicitly asks about prior years / all history. |