title: Symfony2 & Doctrine: Create custom SQL-Query
body: <p>How can I create a custom SQL query in Symfony2 using Doctrine? Or without Doctrine, I don't care.</p>
  
  <p>Doesn't work like this:</p>
  
  <pre><code>    $em = $this-&gt;getDoctrine()-&gt;getEntityManager();
      $em-&gt;createQuery($sql);
      $em-&gt;execute();
  </code></pre>
  
  <p>Thanks.</p>