I keep forgetting how to do this.
How to group on a date column (date_col in the example) in Oracle:
SELECT count(*) FROM table GROUP ON TO_CHAR(date_col, 'DD-MON-YYYY HH:MI:SS')
For other format strings than
'DD-MON-YYYY HH:MI:SS'
see this page.
Leave a Reply
You must be logged in to post a comment.