Say I have a table similar to the following (simplified):
| Name | Date | Hours |
| Bob | 10/1/13 | 5 |
| John | 10/1/13 | 8 |
| Bob | 10/2/13 | 6 |
| Ashley| 10/2/13 | 4 |
...
| Bob | 10/17/13 | 4 |
| John | 10/17/13 | 6 |
| John | 10/18/13 | 3 |
...
Given a starting date (say 10/1/13), how can I construct a query to group Name, SUM(Hours) by 14-day intervals? So that the result would be something like:
| Name | Period | SUM(Hours) |
| Bob | 10/1/13 - 10/14/13 | 11 |
| John | 10/1/13 - 10/14/13 | 8 |
| Ashley| 10/1/13 - 10/14/13 | 4 |
| Bob | 10/15/13 - 10/29/13 | 4 |
| John | 10/15/13 - 10/29/13 | 9 |
I have tried suggestions listed in posts, such as this: Group by date range on weeks/months interval But they usually assume you want actual weeks. Since these are just 14-day intervals, they are not necessarily aligned with the weeks of the year.
Any suggestion or guidance appreciated!
Edit: This is querying a NexusDB server, so it uses the SQL:2003 standard.