title: Oracle date function for the previous month
body: <p>I have the query below where the date is hard-coded. My objective is to remove the harcoded date; the query should pull the data for the previous month when it runs.</p>
  
  <pre><code>select count(distinct switch_id)
    from xx_new.xx_cti_call_details@appsread.prd.com
   where dealer_name =  'XXXX'
     and TRUNC(CREATION_DATE) BETWEEN '01-AUG-2012' AND '31-AUG-2012'
  </code></pre>
  
  <p>Should I use <code>sysdate-15</code> function for that?</p>