Home > Enterprise >  Query function Google Sheet - Aggregation (unwanted) Sorting
Query function Google Sheet - Aggregation (unwanted) Sorting

Time:10-30

I am trying to run what it started as a simple task but it turned out to be more complicated.

I must run a local sum of a column over different elements of another column with a query function. The issue arises because the query performs an unwanted sorting of the grouped column (it is in the format of working weeks - strings) and I cannot get it to unsort or re-sort in the original format.

Initial query is:

=query(A1:B350,"select A, sum(B) group by A")

See the example: enter image description here

  • Related