I have a table
Name | Salary | Desc2 | Desc3 |
---|---|---|---|
ABC | 9 | X | X |
ABC | 9 | X | X |
ABC | 9 | X | X |
XYZ | 4 | Y | Y |
PQR | 1 | Z | Z |
PQR | 1 | Z | Z |
PQR | 1 | Z | Z |
I want it something like :-
Name | Salary | Desc2 | Desc3 |
---|---|---|---|
ABC | 27 | X | X |
XYZ | 4 | Y | Y |
PQR | 3 | Z | Z |
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.
Sign up to join this communityVery simple:
=Query({A1:D8}, "select Col1, sum(Col2), max(Col3), max(Col4) group by Col1",1)
Assuming that the columns to be considered are those from A to D and that row 1 is reserved for headings, you could try this formula:
=query(A1:D,"select A,sum(B),C,D where A is not null group by A,C,D ",1)