Posted By

geekzspot on 01/24/13


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

pedro84


Oracle Group By Day


 / Published in: SQL
 

Count the number of rows that fall within each Day

  1. SELECT TO_CHAR(TRUNC(create_time,'dd'),'Day dd Month YYYY') AS "DATE", COUNT(*)
  2. FROM TABLE
  3. GROUP BY TRUNC(create_time,'dd')
  4. ORDER BY TRUNC(create_time,'dd') DESC
  5. ;

Report this snippet  

You need to login to post a comment.