Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about T-SQL: grouping data by week
Message
From
24/03/2002 21:17:48
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00636665
Message ID:
00636674
Views:
17
Hi, Sergey...

Thanks for your answer - unfortunately, I think I may have worded the question incorrectly.

I'm basically trying to collapse shipments down to the week. I can't really explain this without giving an example...

Monday, the 3rd: 10 units shipped
Friday, the 7th: 11 units shipped

Monday, the 10th, 6 units shipped
Tuesday, the 11th, 21 units shipped
Saturday, the 15th, 3 units shipped

I'm trying to write a T-SQL query so that I can produce this result:

Week ending Saturday the 8th: 21 units shipped
Week ending Saturday the 15th: 30 units shipped

Also, the week ending date for the query could be a Saturday, but could also be another day of the week. And maybe DATEPART is still the answer, though reading BOL about how to use it has me a bit confused.

Thanks,
Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform