Group by

Group by CSV

Summarise a CSV the way GROUP BY does: one row per group, with the counts and totals you need side by side.

Drop a CSV file here or open one from your device. CSV, TSV or TXT; the file is read here and never uploaded.

How to group a CSV

  1. Open a CSV file and tick the columns to group by. Ticking two gives one row per combination, such as region and month.
  2. Add aggregates: pick a column and a function for each. The row count is there to start with.
  3. Sort by a key or by any aggregate, then copy the summary or download it as CSV.

Dates can be bucketed into days, weeks, months, quarters or years before grouping, which turns a transaction log into a monthly summary in one step. To see the result as a chart, open the same file in the chart maker.

Frequently asked questions

What is the difference from the pivot table?

Group by gives one row per group with as many aggregate columns as you like, which is what you want for a summary to paste or chart. The pivot table spreads one aggregate across a grid of rows and columns.

Which aggregates are available?

Row count, count of non-empty values, distinct count, sum, average, minimum, maximum and median. Sum, average and median need a number column; minimum and maximum also work on dates.

How are empty values grouped?

Rows with an empty key are collected in a (blank) group, so no row is silently dropped.

Is it like SQL GROUP BY?

Yes, it gives the same result as SELECT keys, COUNT(*), SUM(…) … GROUP BY keys. For anything more complex, use the SQL query tool.