title: How to get max values for each unique value in a different column in Google Sheets?
body: <p>I have two columns, the first column (A) has names and the second column (B) has values.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>A</th>
  <th>B</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>apple</td>
  <td>10</td>
  </tr>
  <tr>
  <td>orange</td>
  <td>12</td>
  </tr>
  <tr>
  <td>orange</td>
  <td>14</td>
  </tr>
  <tr>
  <td>apple</td>
  <td>8</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Is there a way to get only rows with unique names from A AND max values from B?
  So the result should look like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>A</th>
  <th>B</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>apple</td>
  <td>10</td>
  </tr>
  <tr>
  <td>orange</td>
  <td>14</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I tried using different combinations of FILTER, QUERY and UNIQUE, but so far no luck. Note that the actual dataset I'm using is much larger than this, but the idea is the same.</p>