title: How to get the last date of previous three months
body: <p>Hello i would like to know how to get the last date of previous three months in Oracle.i tried using the following query to get the result but it showed me the first date of the months.</p>
  
  <p>Query :</p>
  
  <pre><code>select TO_CHAR(TRUNC(ADD_MONTHS(last_day(SYSDATE),-level),'MONTH'),'DD-MM-YYYY') month 
  from dual
  connect by level&lt;4;
  </code></pre>
  
  <p>Output i am desiring to get : </p>
  
  <pre><code>30-NOV-2015
  31-OCT-2015
  30-SEP-2015
  </code></pre>
  
  <p>Thanks.</p>