When you are displaying your data in the Data Display window, you can use a function of the grid to automatically group your data by particular columns.
If you select View > Group-by Box (or Ctrl+G) AQT will display a Group-By box at the top of the display. This allows you to group your data by particular columns; this function is extremely useful for analysing your data.
Once you have grouped your data, you can calculate sub-totals on the data.