Is there a way to make this type of query work?

2019-09-04 06:47发布

问题:

=query(G2:I80,"select G,H,I where H=max(H) group by I",-1)

Columnn G is names Column H is vote count and Column I is Their respective teams.

I want to view the top voted names of each team and sometimes the some top voted names are tied so I wanna view both names using the query above but it dont seem to work.

回答1:

I am not entirely sure what you want (a formula that does not work is not a good guide) but perhaps:

=sort(filter(query(G2:I80,"select G, H, I ",-1),H2:H80=Max(H:H)),3,TRUE)