I have 3 tables: People, Group, and a PeopleGroup join table. PeopleGroup has a start and end date. Using linq-to-sql, I'm trying to write a query that will pull the count of group members on a 1-week interval for any given group over a specified date range. The end result would look something like (for group x in January):
Date People Count
1/3/2009 445
1/10/2009 420
1/17/2009 426
1/24/2009 435
1/31/2009 432
Is that possible or do I need to write separate queries for each group/week combination?