Can anyone give an example of how one would use a sub-item inside the Add data/edit additional data option the query activity?
As per Adobe's documentation, the add sub-item option lets you attach computed data to the collection. This lets you select the additional data from the collection or define aggregate calculations on collection elements.
Most of the time when you define aggregate calculations you have to disable the primary key addition to use group by clause otherwise group by will not work as all rows will be unique because of primary key so we create aggregate and use a 1-1 link to add this back to main target query. Now you have everything i one query and you are all set for the final send out.