>_ IzzyLab

Topic breakdown

datamash can group rows before counting: the grouping flag sets the key column, and the operation with a column number computes a summary within each group. The key nuance of the model is that grouping works on consecutive rows, so the input must be sorted by the key; either sort it beforehand, or ask datamash to do it itself with the corresponding flag. The task is about the typical group-by pattern over a flat table and about why the result falls apart without sorting.

What's checked

  1. group sums are correct

What it looks like