title: Get last 7 days records from table in zend
body: <p>Hi guys i am trying to get last 7 days closed tickets from table
  Here is the query i have wrote</p>
  
  <pre><code>'closed' =&gt; new Zend_Db_Expr('SUM(IF(rt.assignee_id IS NOT NULL,IF(rt.status_id = 24,1,0),0))')
  </code></pre>
  
  <p>can any one help me how can i add my condition inside IF?</p>
  
  <p>Thanks in advance.</p>