title: SQL: Compare if column values in two tables are equal
body: <p>I'm working on mysql and have two tables with the same schema:</p>
  
  <p><strong>preTrial</strong></p>
  
  <pre><code>|id|accusedId|articleid|
  ------------------------
  |1 |     1   |     1   |
  |2 |     1   |     2   |
  |3 |     1   |     3   |
  |4 |     2   |     1   |
  |5 |     2   |     2   |
  </code></pre>
  
  <p><strong>trial</strong></p>
  
  <pre><code>|id|accusedId|articleid|
  ------------------------
  |1 |     1   |     1   |
  |2 |     1   |     2   |
  |3 |     2   |     1   |
  |4 |     2   |     2   |
  </code></pre>
  
  <p>I want to get those <code>accusedIds</code> where all the <code>articleIds</code> of the first and the second tables are equal.</p>
  
  <p>The above example should only return the accusedId 2, cause for accusedId 1 there is no articleId 3 in the second table. </p>
  
  <p>I hope you understand what i mean. I'm currently writing my thesis in law, and the the time i was into sql is long gone by. Of course i already did some research, and tried several joins, but i was not able to find a solution. Hopefully you can help me.</p>