问题
I'm running a pretty simple query with a sum and group by, but I'd like to aggregate multiple distinct values from the rows into a single row and column. I've looking to concatenate all those values together.
Take a look at my sample; https://docs.google.com/spreadsheets/d/1GcYbwAujKQFpolTQb9h35mlP5mxmeiWJmPnp4OemNuU/edit?usp=sharing
I have my query in F1 and the desired output in F11.
回答1:
You can use the filter and join functions to help:
To get a unique list of names:
=UNIQUE(A3:A)
To join the widgets:
=join(",",filter(B:B,A:A=E3))
To sum the values:
=sum(filter(C:C,A:A=E3))
来源:https://stackoverflow.com/questions/36048134/google-sheet-query-group-concatenate-multiple-rows