;WITH data (type, date) AS (
SELECT 'a', CAST('20110310' AS datetime) UNION ALL
SELECT 'a', CAST('20110311' AS datetime) UNION ALL
SELECT 'a', CAST('20110312' AS datetime) UNION ALL
SELECT 'a', CAST('20110314' AS datetime) UNION ALL
SELECT 'a', CAST('20110315' AS datetime) UNION ALL
SELECT 'b', CAST('20110313' AS datetime) UNION ALL
SELECT 'b', CAST('20110314' AS datetime) UNION ALL
SELECT 'b', CAST('20110315' AS datetime) UNION ALL
SELECT 'c', CAST('20110310' AS datetime) UNION ALL
SELECT 'c', CAST('20110312' AS datetime) UNION ALL
SELECT 'c', CAST('20110313' AS datetime) UNION ALL
SELECT 'c', CAST('20110314' AS datetime)
),
grouped AS (
SELECT
type,
date,
groupID = DATEADD(day, -ROW_NUMBER() OVER (PARTITION BY type ORDER BY date), date)
FROM data
),
startdates AS (
SELECT
type,
groupStartDate = MIN(date)
FROM grouped
GROUP BY type, groupID
)
SELECT
type,
LastGroupStartDate = MAX(groupStartDate)
FROM startdates
GROUP BY type