How can I structure a query in Google Sheets that will combine cells with the same text (name 1, name 2, etc) and then sum their associated numeric values in column B (sale 1, sale 2, etc) and sort in descending order? The end goal is to use this to create a labeled by name but sorted by largest to smallest sale number as it seems you cannot edit the table itself without changing the data it is drawing data from.
I have a table with a lot of different data corresponding to sales made by various people and am looking to make a chart that shows total amount of sales per person. I am still new to queries so feel like I am missing a simple solution to this.
Try this:
=Query(A2:B,"select A, sum(B) group by A order by sum(B) desc label sum(B) ''")