使用 QUERY 过滤 table 以获得匹配最大值的整行 table

Filtering a table with QUERY to get a whole line of a table that matches the maximum of a value

问题

我有一个 table 有 3 个数据:

我想在 GoogleSheets 中使用 QUERY 恢复由 A 分组的列 H,其最大值为 B

=QUERY(resume!A2:H;"select A,Max(B) where A<>'' group by A ";1)

工作正常,但我看不到 H

=QUERY(resume!A2:H;"select A,Max(B),H where A<>'' group by A ";1)

无效。错误H需要聚合

=QUERY(resume!A2:H;"select A,Max(B),H where A<>'' group by A,H ";1)

向我展示了 A 和 H 的每一行不同之处。这意味着我有所有行


#例子:#
来源 Table
[A] 	 [B]	 [H]
S01 	 10	 A
S01 	 8	 B
S02 	 20	 C
S02		D

#QUERY的期望结果#
[A] 	 [B] 	 [H]
S01 	 10 	 A
S02 	 20 	 C


尝试:

=SORT(SORTN(SORT({A2:B, H2:H}, 2, 0), 9^9, 2, 1, 0), 1, 1)