In Excel, there is a grouping function where you can enter a starting value, an end value and indicate increment by to group the data. For example,
starting at = 0, End at = 196, By: 7 so the data is group as following:
Row_Label Count
0-6 50(between 0 and 6 days, we have 50
7-13 21(between 7 and 13 days, we have 21
14-20 33
21-27 15
... ...
175 - 181 35
can I accomplish this grouping methodology in SQL? Basically, i have a TicketOpenDate (datetime data type) in a table. I calculate the # of days outstanding between the TicketOpenDate an getdate(). Now I want to group by the above scenario. Your help/suggestion is greatly appreciated.
Thanks
starting at = 0, End at = 196, By: 7 so the data is group as following:
Row_Label Count
0-6 50(between 0 and 6 days, we have 50
7-13 21(between 7 and 13 days, we have 21
14-20 33
21-27 15
... ...
175 - 181 35
can I accomplish this grouping methodology in SQL? Basically, i have a TicketOpenDate (datetime data type) in a table. I calculate the # of days outstanding between the TicketOpenDate an getdate(). Now I want to group by the above scenario. Your help/suggestion is greatly appreciated.
Thanks