Sufficient-stat aggregates for the final SELECT.
(self)
| 100 | raise ValueError(f"Unsupported metric aggregation: {agg}") |
| 101 | |
| 102 | def outer_select(self) -> str: |
| 103 | """Sufficient-stat aggregates for the final SELECT.""" |
| 104 | a = self._alias |
| 105 | return f"sum({a}) AS {a}_sum, sum({a} * {a}) AS {a}_sum_squares" |
| 106 | |
| 107 | def decode(self, n: int, row: Sequence[Any], index: dict[str, int]) -> VariantStats: |
| 108 | """Read this slot's two columns (sum, sum_squares) from a row by name.""" |