title: SELECT DISTINCT values - multiple rows of same ID - multiple conditions
body: <p>this is my starting table:</p>
  
  <pre><code>User_ID | FIELD_KEY    | VALUE
  11      |  name        |  John
  11      |  test1_score |  9
  11      |  test2_score |  6
  11      |  test3_score |  8
  11      |  test5_score |  3
  27      |  name        |  Peter
  27      |  test1_score |  7
  27      |  test3_score |  3
  28      |  name        |  Nick
  28      |  test1_score |  6
  28      |  test2_score |  5
  33      |  name        |  Felix
  33      |  test1_score |  7
  33      |  test2_score |  3
  </code></pre>
  
  <p>How can I select the unique User_IDs of the following</p>
  
  <p>Conditions:</p>
  
  <ul>
  <li>All users who have an entry for both: test1_score and test2_score</li>
  <li>All users for whom test1_score >= 7</li>
  <li>ORDER BY test1_score ASC</li>
  </ul>
  
  <p>Seems quite a challenge...</p>
  
  <p>Is it even possible with ONE query?</p>
  
  <p>In this example result should be two users with User_ID: #11 and #33. That’s because even though user #28 also has both test1_score and test2_score entries, only for user #11 and #33 test1_score >= 7. </p>
  
  <p>Ideally I’d get a result like this:</p>
  
  <pre><code>User_ID   |   NAME         | TEST1_SCORE  |  TEST2_SCORE    |
  33        |     Felix      |    7         |  3              |
  11        |     John       |    9         |  6              |
  </code></pre>
  
  <p>Any help is very much appreciated.</p>
  
  <p>Thanks!</p>