|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Counting Consecutive days in SQLI've been trying to figure out how to count the number of consecutive
days of entries in a table. the table stores data on number of minutes exercised in a day for users of an exercise program: ExerciseId int UserId int Minutes int ExerciseDate datetime I need to produce a list of users who exercised XX number of days in a row. e.g. 60 consecutive days of exercise. Any ideas on how to do that? I'm using SQL Server 2000. Thanks VibroluxO***@gmail.com wrote:
Show quote > I've been trying to figure out how to count the number of consecutive http://www.aspfaq.com/show.asp?id=2519> days of entries in a table. the table stores data on number of minutes > exercised in a day for users of an exercise program: > > ExerciseId int > UserId int > Minutes int > ExerciseDate datetime > > I need to produce a list of users who exercised XX number of days in a > row. e.g. 60 consecutive days of exercise. Any ideas on how to do that? > I'm using SQL Server 2000. > > Thanks > |
|||||||||||||||||||||||