I have a database and a date column in the database which has values like 5/2/2012 vs. I am trying to get all the rows that is in the same week and count each week how man row it has.
I try to get an output like the below:
For example
8-14 October | 15
1-7 October | 8
24-30 September | 12
etc...
I will probably use group by and count statement and functions but ı have no idea how to detect a week like 8-14 October.
The database is a maximo database by oracle. Thanks.
Trunc(date_value) will return first day of week (sunday):