如何在 Google 电子表格中设置具有两个条件的公式?

How can I set a formula with two conditions in Google Spreadsheet?

如何在 Google 电子表格中设置具有两个条件的公式?(Sample table)

我想添加越来越多的名字,我需要 table 自动化。

我认为这个公式在单元格 G4 中可以正常工作:

=QUERY(A4:C,"select C,sum(B),count(B),avg(A),sum(A),count(A),avg(B) where C<>'' group by C")