this amazed me :)
SELECT t.stbid,
STUFF(
ISNULL(
(SELECT ', ' + cast(x.episodeid as varchar(50))
FROM StbDownloadQueue x
WHERE x.stbid = t.stbid and x.deleted = 0
GROUP BY x.episodeid FOR XML PATH (''))
, ''), 1, 2, '')
FROM StbDownloadQueue t where t.deleted = 0
GROUP BY t.stbid