title: MySQL where exists, how does mySQL link the rows?
body: <p>I'm having a problem grokking this code</p>
  
  <pre><code>SELECT * FROM sometable WHERE EXISTS (
     SELECT 1 FROM sometable
     GROUP BY relevant_field
     HAVING count(*) &gt; 1) 
  </code></pre>
  
  <p>If I use a JOIN, I specify the link explicitly, but here I don't so I don't have clear concept of what's happening inside MySQL.</p>
  
  <p><strong>How does MySQL know how to link the rows from the inner sometable to the outer sometable?</strong></p>