Hands-on task
This task is step 15 of the course “awk and datamash: reports from tables”
Sum by Group
In /root/sales.tsv the same product appears several times. Compute the sum of units sold for each product (grouping by the name in the first column) and write the result to /root/by_item.tsv — one line per product: the name and its sum.
Reference:datamash
What you'll practise:
- datamash
- grouping
- aggregation
- sorting
- tsv