title: Order By month and year in ORACLE with sum
body: <p>I have a stored procedure and the select statement is:</p>
  
  <pre><code>  SELECT COUNT(IDENTIFIER) AS      TOTALORDER,SUM(FT.ACTUALORDER01+FT.ACTUALORDER02+FT.ACTUALORDER03+FT.ACTUALOR      DER04) AS TOTALORDER,
    SUM(TOTALPENDING) AS PENDING,
    TO_CHAR(TO_DATE(DATE),'MonthYYYY') AS "Month-Year"
                                                              FROM FTORDER      FT FULL JOIN FSDPENDING FS
                                                              ON      FS.IDENTIFIER=FT.ORDERNUMBER
                                                              AND     FT.ORDERDATE=FS.ORDERDATETIME
                                                              AND FT.ORDREcode=FS.ORDERcode
                                                              AND FT.sequence=FS.sequence
                                                              AND FT.recordstatus=FS.recordstatus
                WHERE TRUNC(FORDERDATETIME) BETWEEN TO_DATE('01-JAN-2014','dd/mon/yyyy') AND TO_DATE('31-DEC-2015','dd/mon/yyyy')
                                                              AND TORDERNUMBER NOT LIKE ('-%') 
      GROUP BY TO_CHAR(TO_DATE(DATE),'MonthYYYY')
      ORDER BY "Month-Year"
   ;
  </code></pre>
  
  <p>this shows the sum total for every month But I need to order the result by month and year coz my result shown like:</p>
  
  <pre><code>April 2013 
  February 2013 
  January 2013 
  June 2013 
  March 2013 
  May 2013 
  </code></pre>
  
  <p>What is the solution in such a case?</p>