title: Group By day and month Doctrine
body: <p>I'd like to list my users by birthday, so month and day but not year.</p>
  
  <p>I have this query</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT * 
  FROM user 
  WHERE birthDate IS NOT NULL 
  GROUP BY MONTH(birthDate), DAY(birthDate)
  </code></pre>
  
  <p>But I don't know how to use it with Symfony and Doctrine.
  I tried</p>
  
  <pre><code>$result = $em-&gt;getRepository("AcmeApplicationBundle:SecurityServiceUser")
              -&gt;createQueryBuilder('user')
              -&gt;where('user.birthDate IS NOT NULL')
              -&gt;groupBy('MONTH(user.birthDate), DAY(user.birthDate)')
              -&gt;getQuery()
              -&gt;getResult(); 
  </code></pre>
  
  <p>And</p>
  
  <pre><code>$result = $em-&gt;getRepository("AcmeApplicationBundle:SecurityServiceUser")
              -&gt;createQueryBuilder('user')
              -&gt;where('user.birthDate IS NOT NULL')
              -&gt;groupBy('MONTH(user.birthDate)')
              -&gt;groupBy('DAY(user.birthDate)')
              -&gt;getQuery()
              -&gt;getResult(); 
  </code></pre>
  
  <p>But in both cases I have an error</p>
  
  <blockquote>
    <p>[Semantical Error] line 0, col 165 near 'MONTH(birthDate),': Error: Cannot group by undefined identification or result variable.</p>
  </blockquote>