Query to View only top counts and counted by group
问题 I wanted to use this query =query(G2:I80,"select G,H,I where H=max(H) group by I",-1) From this: Cdd Cts T NWH 4 A1 LBB 3 A1 MP 3 A1 DC 2 A1 AK 10 A10 CC 3 A10 SC 2 A11 JL 1 A11 VT 1 A11 To This: T Cdd Cts A1 NWH 4 A10 AK 10 A11 SC 2 Am I doing it right? Or I have to come up with something to manually count them? 回答1: Try =ArrayFormula(iferror(vlookup(unique(I2:I), sort({I2:I, G2:H},3,), {1,2,3},0))) and see if that works for you ? How does it work: 1: with sort() a new 'virtual' table is