Vous pouvez utiliser un GROUP BY
et toute fonction d'agrégation sur dateadded
colonne pour obtenir un author, pubdate
unique résultats.
SELECT [author]
,[pubDate]
,MAX([dateadded])
FROM [Feeds].[dbo].[socialPosts]
WHERE CAST(FLOOR(CAST(dateadded AS float)) AS datetime) > dateadd(day,datediff(day, 0, getdate()-2), 0)
AND CAST(FLOOR(CAST(dateadded AS float)) AS datetime) < dateadd(day,datediff(day, 0, getDate()), 0)
GROUP BY
[author]
, [pubdate]