CREATE TABLE [tb] (Id INT ,postId INT )
INSERT INTO [tb]
SELECT 2788 , 45753530 UNION ALL
SELECT 6417 , 46862065 UNION ALL
SELECT 61773 , 47407456 UNION ALL
SELECT 61773 , 47436468 UNION ALL
SELECT 61773 , 47448259 UNION ALL
SELECT 61773 , 47474393 UNION ALL
SELECT 83604 , 41671947 UNION ALL
SELECT 83604 , 45858681 UNION ALL
select id, postid from ( select * ,cid = row_number() over (partition by id order by id) from tb ) as t
where t.cid <= 3