So, I've been stuck on this problem for last couple of days and I still couldn't come up with solution.

I want to group given month into weeks which is fairly easy but the (horrible)business requirement is to consider a single day also as a week if it 
falls on any day between Monday to Sunday. The end day of the week is going to be Sunday.

For example I'll take month of August for demonstration. According to business requirement, this is how the data should be displayed for the given month

```
First week  - August 1st to August 2nd, 2015
Second week - August 3nd to August 9th, 2015
Third week  - August 10th to August 16th, 2015
Fourth week - August 17th to August 23rd, 2015
Fifth week  - August 24th to August 30th, 2015
Sixth week  - August 31st, 2015

```

I'm completely clueless on how to proceed with the problem due to the sixth week occurrence. 
I came across this query on AskTom which display 5 weeks but resets back to 1 on the 31st of August. Moreover, the query doesn't look like an elegant solution.

```
select dt, to_char( dt+1, 'w' )
     from ( select to_date('1-aug-2015')+rownum dt
              from all_objects
                    where rownum < 31 );

```

Looking for suggestions/insights on the problem. 
Thanks