John Mitchell-245523
SSC Guru
Points: 148809
More actions
January 11, 2016 at 9:43 am
#1851016
In that case, it's even simpler.
SELECT
id
,product
,MIN(start_date) AS StartDate
,NULL AS EndDate
FROM @t
GROUP BY
HAVING COUNT(*) > COUNT(end_date)
But what happened to the DATEDIFF requirement?
John
Viewing post 16 (of 15 total)
You must be logged in to reply to this topic. Login to reply