title: Group values by day
body: <p><strong>I'm using Oracle 11g,</strong>
  <strong>Plsql version 10.0.1</strong></p>
  
  <p>I fetch a daily report for Product_Status. Once the raw data come. I make a pivot from the raw data and group it by product sales by date column in MS Excel. I want to do the same thing in the query itself.</p>
  
  <p><strong>product sales date format</strong> : 3/12/2014 7:57:27 AM<br>
  <strong>Tbl_Name</strong> : tv_productdetails</p>
  
  <p><strong>Plain Sql Query</strong><br><br>
  Below is the sample query for product details : </p>
  
  <pre><code>Select product.id, Product_Sales_Date
  from smspadm.tv_productdetails
  where 
  Product_Sales_Date &gt;= TO_DATE('01-april-2014','DD-MON-YYYY')
  and Product_Sales_Date &lt; TO_DATE('04-april-2014','DD-MON-YYYY')
  and product_status in('active')
  </code></pre>
  
  <p>The expected output would be:</p>
  
  <pre><code>product.id 1-Apr 2-Apr 3-Apr 4-Apr Grandtotal
  
  A011          89     89   89    89  356
  B055          85     85   85    85  340
  C055          78     78   78    78  312
  D011          98     98   98    98  392
  E897          45     45   45    45  180
  </code></pre>
  
  <p>I need only two columns Product.id, Product_Sales_Date to group the data by sales date.
  Below is the sample data:</p>
  
  <pre><code>Product.id  Product_Sales_Date
  
  A001    4/12/2014 3:38:00 PM
  A002    4/13/2014 3:38:00 PM
  A003    4/14/2014 11:34:34 AM
  A004    4/15/2014 12:56:52 PM
  A001    4/16/2014 10:54:58 AM
  A002    4/17/2014 9:01:19 AM
  A003    4/18/2014 12:56:52 PM
  A004    4/19/2014 3:38:00 PM
  A005    4/20/2014 1:07:49 PM
  A006    4/21/2014 3:02:14 PM
  A004    4/22/2014 10:55:54 AM
  A005    4/23/2014 3:16:28 PM
  A006    4/24/2014 8:46:48 AM
  A007    4/25/2014 3:53:32 PM
  A008    4/26/2014 7:57:27 AM
  </code></pre>