title: Count DIFFDATE Exceeding A Specified Value - Step 2
body: <p>Further to my earlier question.  Now I have two different queries that work.  The first query returns a result of 5092 and the second returns a result of 1885 adding up to 6977.  I would like to combine them into one query to return a result of 6977.  How can I make one query count the number of conditionassessmentdates that are active, overdue by more than 14 days and null (counts as overdue)?  Thanks in advance.  </p>
  
  <pre><code>select count (*)
  from task_conditionassessment t
      inner join taskitems_conditionassessment ti on
          t.task_conditionassessmentguid=ti.task_conditionassessmentguid  
      inner join conditionassessmentassignmentitem c on
          ti.taskitems_conditionassessmentid=c.taskitems_conditionassessmentid
  where datediff(dd,c.conditionassessmentdate,t.nextduedate)&gt;14 and t.isactive=1
  
  
  select t.taskname,t.nextduedate,c.conditionassessmentdate
  from task_conditionassessment t
      inner join taskitems_conditionassessment ti on
          t.task_conditionassessmentguid=ti.task_conditionassessmentguid
      inner join conditionassessmentassignmentitem c on
          ti.taskitems_conditionassessmentid=c.taskitems_conditionassessmentid
  where c.conditionassessmentdate IS NULL and t.isactive=1
  </code></pre>