Suppose I have this table:
| Name | Amount | Category || name_1 | 10 | A || name_2 | 2 | B || name_3 | 3 | B || name_4 | 6 | C |Thanks to this answer, I know how to write a query that groups the rows by category, and gives me sum of Amount by category, like this:
=QUERY(A2:C5,"select C, sum(B) group by C order by sum(B)")My question is: how do I add a third row to my query, such that it lists the Name of every row in that group (possibly, but not necessarily, comma-separated)?
In other words, I'd like the result to look like this:
| | sum | items || B | 5 | name_2, name_3 || C | 6 | name_1 || A | 10 | name_4 |

