title: Error in Nested SubQuery In DQL: Class '(' is not defined
body: <p>I have a DQL as like below:</p>
  
  <pre><code>SELECT at, count(at.id) FROM AccountTriple at JOIN at.property p JOIN at.account ac WHERE p.create_analytics = '1' GROUP BY at.property, at.value, ac.service
  </code></pre>
  
  <p>As you can see, it has three joins. As 'at' and 'ac' both have large amount of data. In attempt to optimize it, I am trying to move the "p.create_analytics = '1'" checking before join to 'ac' to give it a smaller data set to join. I am trying to achieve something like this:</p>
  
  <pre><code>SELECT at, count(at.id) FROM ( SELECT at FROM AccountTriple at JOIN at.property p WHERE p.create_analytics = '1' ) JOIN at.account ac  GROUP BY at.property, at.value, ac.service
  </code></pre>
  
  <p>But somehow, my syntax isn't working. A error message is showing as below:</p>
  
  <blockquote>
    <p>Semantical Error] line 0, col 29 near '( SELECT at FROM': Error: Class '(' is not defined.</p>
  </blockquote>
  
  <p>Didn't find similar example anywhere else as well. Does anyone can help to fix this DQL query to get working? Thanks in advance.</p>