query with group by and count missing zero counts Google sheets

Viewed 863
1 Answers

Try this:

=ARRAYFORMULA(QUERY({Sheet1!D2:D,N(Sheet1!F2:F&Sheet1!H2:H="person-personAcquaintence")},"select Col1,SUM(Col2) where Col1<>'' group by Col1"))

SUM()'ing in a query lets you show 0s in a way that counting doesn't really.

Related