While you're reading the results, keep track of the previous client name. Start a new "group" whenever it changes.

Code:

previous client = empty
for each user {
if current client != previous client {
if the previous client isn't empty and you need to "close" groups {
close the previous group
}
start a new group for this client
}
display the user
previous client = current client
}
if you need to "close" groups {
close the previous and last group
}

Grouping row results by a category

I have a column with 250 different bits of data ranging from numbers 1-6. When I try to make that column into a pie chart the numbers dont group together. How do I do it so that there are 6 different categories on the pie chart (one for each individual number) instead of 250 sections on the pie chart.