google-sheetsgoogle-sheets-formulastring-formattinggoogle-query-language

Query formula not grouping properly


I have a google sheet where one tab is the data entry sheet named " Master Sheet". and I have another tab labeled "Charts/Tables". On the second tab I have a query pulling data form the first.

The query looks like this:

=QUERY('Master Sheet'!A1:N, "select B, H, I, max(K), L, M where B is not null group by B, H, I, K, L, M order by B label B 'Transfer #', H 'Box #', I 'Total Boxes In Transfer', M 'Shelved'")

It works, but not exactly how I need it to. I would like to also group column H but when there are entries for the same box each entry has a line in the query results.

Here is the link to my example:link

I've tried rearrnging the grouping, changing the column refernce to Col# instead of using the column letters an I am at a loss.


Solution

  • You may try:

    =QUERY('Master Sheet'!A1:N, "select B, H, I, max(K), max(L), max(M) where B is not null group by B, H, I")
    

    enter image description here