Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jeff06
Posting Yak Master
166 Posts |
Posted - 2009-05-15 : 10:20:38
|
| I have a table t.id date value1 01/01/2007 101 10/09/2006 201 08/29/2007 251 09/06/2008 211 07/03/2008 201 09/01/2008 251 08/29/2007 251 09/16/2004 211 07/13/2004 101 09/11/2003 252 01/01/2004 102 10/09/2004 202 08/29/2007 242 09/06/2008 272 07/03/2008 102 09/01/2008 252 08/29/2007 252 09/16/2004 212 07/13/2004 10I want to find the starting date and ending date and # of times for each id which have the longest continue value >=20 . the output table should look like or id startdate enddate times1 29aug2007 06sep2008 52 16sep2004 19aug2007 4 Thanks.Jeff2 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|
|