title: Doctrine 2 DQL: Can I combine these queries into 1
body: <p>I am trying to combine these queries into 1</p>
  
  <pre><code># Get completed todos
  SELECT COUNT(t.id) from Application\Models\Todos t 
  WHERE t.parent IS NULL 
  AND t.todoList.project = :proj
  AND t.completedOn IS NOT NULL
  
  # Get total todos
  SELECT COUNT(t.id) from Application\Models\Todos t
  WHERE t.parent IS NULL 
  AND t.todoList.project = :proj
  </code></pre>
  
  <ul>
  <li>A Project have Lists</li>
  <li>A List have Todos</li>
  <li>A Todo can have 1 level of children todo - In my queries, I was querying for top level todos</li>
  <li>A Todo have completedOn, dueOn</li>
  </ul>
  
  <p>In another function, I want to get </p>
  
  <ul>
  <li>total number of tasks belonging to you &amp; the project</li>
  <li>total number of completed tasks belonging to you &amp; the project</li>
  <li>total number of incompleted tasks due today belonging to you &amp; the project</li>
  </ul>
  
  <p>Do I need to do it in separate queries?</p>