Query for records and store result under name dbSet:

Here are the records:

No. Username Beverage Cost
1 Jakob Any Cola 0.50
2 Jakob Dr. Pepper 0.50
3 Mark Beer 3.50
4 Mark Latte 2.50
5 Mark Water 0.00
6 Nick Hippie Soda 1.50

Using a StringMatrix tag these will be grouped by the username column and totaled in a manner similar to a spreadsheet. New record sets will be produced that allow records, labels and totals to be formatted and displayed separately.

No. Beverage Cost
Items for Jakob
1 Any Cola 0.50
2 Dr. Pepper 0.50
Subtotal: 1.00
Items for Mark
3 Beer 3.50
4 Latte 2.50
5 Water 0.00
Subtotal: 6.00
Items for Nick
6 Hippie Soda 1.50
Subtotal: 1.50
 
Grand Total: 8.50

Source