Попробуйте это:
DECLARE @DataSource TABLE
(
[UserID] INT
,[TeamID] INT
,[StartedDate] VARCHAR(24)
);
INSERT INTO @DataSource ([UserID], [TeamID], [StartedDate])
VALUES (36202, 1213, '27/11/2019 9:00')
,(36203, 1213, '1/11/2019 10:30')
,(36203, 1207, '24/11/2019 10:00')
,(36205, 1207, '21/11/2019 9:15')
,(36203, 1213, '1/11/2019 10:30')
,(36214, 1217, '10/11/2019 10:00')
,(36205, 1207, '24/11/2019 10:00')
,(36202, 1213, '1/11/2019 10:30');
-- SQL Server 2017+
SELECT [StartedDate]
,STRING_AGG([UserID], ',') AS [UserID's]
FROM
(
SELECT DISTINCT [StartedDate]
,[UserID]
FROM @DataSource
) DS
GROUP BY [StartedDate];
-- SQL Server
WITH DataSoruce AS
(
SELECT DISTINCT [StartedDate]
FROM @DataSource
)
SELECT *
FROM DataSoruce A
CROSS APPLY
(
SELECT STUFF
(
(
SELECT DISTINCT ',' + CAST([UserID] AS VARCHAR(12))
FROM @DataSource S
WHERE A.[StartedDate] = S.[StartedDate]
FOR XML PATH, TYPE
).value('.', 'VARCHAR(MAX)')
,1
,1
,''
)
) R ([UserID's])