title: Filtering a table with QUERY to get a whole line of a table that matches the maximum of a value
body: <h1>Problem</h1>
  <p>I have a table with 3 data:</p>
  <ul>
  <li><p>A is text</p>
  </li>
  <li><p>B is number</p>
  </li>
  <li><p>H is text</p>
  </li>
  </ul>
  <p>I want with QUERY in GoogleSheets recover the column H grouped by A that has the max of B</p>
  <pre><code>=QUERY(resume!A2:H;&quot;select A,Max(B) where A&lt;&gt;'' group by A &quot;;1)
  </code></pre>
  <p>is working perfectly but I can't see H</p>
  <pre><code>=QUERY(resume!A2:H;&quot;select A,Max(B),H where A&lt;&gt;'' group by A &quot;;1)
  </code></pre>
  <p>is not working. Error H needs aggregation</p>
  <pre><code>=QUERY(resume!A2:H;&quot;select A,Max(B),H where A&lt;&gt;'' group by A,H &quot;;1)
  </code></pre>
  <p>is showing me each line of A and H that are different. That means I have all the lines</p>
  <pre>
  
  #Example:#
  Source Table
  [A] &#9 [B]&#9 [H]
  S01 &#9 10&#9 A
  S01 &#9 8&#9 B
  S02 &#9 20&#9 C
  S02 &#9 7&#9 D
  
  #wished result for QUERY#
  [A] &#9 [B] &#9 [H]
  S01 &#9 10 &#9 A
  S02 &#9 20 &#9 C
  
  
  </pre>