Q&A for scientists using computers to solve scientific problems
WITH dates(date, score) as ( SELECT DISTINCT CONVERT(DATE, CreationDate) AS date, Score as score FROM Posts WHERE OwnerUserId = ##UserId## ), groups AS ( SELECT ROW_NUMBER() OVER (ORDER BY date) AS rn, dateadd(day, -ROW_NUMBER() OVER (ORDER BY date), date) AS grp, date, score FROM dates WHERE score > 2 ) SELECT * FROM groups