I have table where i have some data and i am doing a group by operation on those data set. I.I am doing the group by operation using date , like i have my first and last column as date so my first column is date and last column is previous Sunday of that date,so which dates have same previous Sunday will belong to a group .So i am doing the group by by previous Sunday .Now my requirement is ,when i am doing group by i have need to show starting date and ending date of that group i am column. I am posting my table structure below ,
DateAdded Souring Inake placement PreviousSunday
'22 Jan 2015' 2 4 6 '2015-01-18'
'23 Jan 2015' 5 6 8 '2015-01-18'
'24 Jan 2015' 8 7 6 '2015-01-18'
'26 Jan 2015' 6 1 9 '2015-01-25'
'27 Jan 2015' 8 56 0 '2015-01-25'
........................................... and so on . so my 1st 3 rows have their previous Sunday common,so they belong o a group.next two also have their previous Sunday common.so In my output what i want to show like
DateAdded Souring Inake placement PreviousSunday DateStartEnd
'22 Jan 2015' 2 4 6 '2015-01-18' '22 Jan 2015' - '24 Jan 2015'
'26 Jan 2015' 6 1 9 '2015-01-25' '26 Jan 2015' - '27 Jan 2015'
How to achieve that ?? someone please help