Google Sheets – Resolve Query Divide by Sum(Col) Error

google sheetsgoogle-sheets-arrayformulagoogle-sheets-query

I'm doing a simple query but keep getting the error "Add_col_to_group_by_or_agg:Col1".

The formula is

=QUERY({L42:N63}, "Select (Col1*Col3)/Sum(Col1)",0)

What I'm looking for is just as straightforward as the column of result, multiply, then divide by the sum. Thank you in advance.

Best Answer

This is perhaps easier to do without query(), like this:

=arrayformula(L42:L63 * N42:N63 / sum(L42:L63))