title: SQLite How to Group data according to custom rules
body: <p>I have a table as below.
  If I do a group by operation on the name field, the key of b is 11,but what I need to leave is 12, because 12 has already appeared in other records.
  What should I do to achieve this result, without using the max aggregation method</p>
  <p>Introduce the meaning of the table,
  key-12 also provides name-a, name-b, key-11 only provides name-b
  For name-c, there are three key that can provide name-c, all of which are not repeated</p>
  <pre><code>|name|key|
  | a | 12 |
  | b | 11 |
  | b | 12 |
  | c | 15 |
  | c | 14 |
  | c | 17 |
  ....
  </code></pre>
  <p>What I hope is that the result obtained through group by is:</p>
  <pre><code>|name|key |
  | a  | 12 |
  | b  | 12 |
  | c  | 15 | 
  </code></pre>
  <p>To perform group by operations through the name field,
  b needs to leave key-12, because key-12 provides both name-a and name-b,
  so key-11 is not needed.</p>
  <p>For name-c, there are three key that can provide name-c, all of which are not repeated, so let's just use the one that appears for the first time.</p>