Browse our collections
DECLARE @__GetValueOrDefault_1 int = 12;
SELECT [t0].[CollectionProductId], [t0].[CollectionId], [t0].[ProductId]
FROM (
SELECT DISTINCT [c].[CollectionId]
FROM [CollectionProduct] AS [c]
WHERE [c].[CollectionId] IN (105, 7, 104, 11, 17, 27, 39, 45, 25, 108, 1, 93, 106, 42, 8, 103, 26, 109, 28, 107, 110, 23, 94, 35, 83, 24, 12, 16, 29, 115, 2, 34, 41, 40, 4, 21, 62, 3, 44, 114, 227, 14, 60, 90, 56, 55, 38, 53, 217, 46, 112, 89, 20, 61, 226, 49, 57, 91, 48, 223, 254, 33, 52, 36, 233, 225, 253, 6, 221, 10, 59, 50, 220, 113, 111, 18, 84, 218, 229, 264, 88, 298, 19, 47, 85, 37, 64, 32, 13, 43, 300, 92, 222, 206, 54, 224, 58, 232, 30, 63, 51, 219)
) AS [t]
INNER JOIN (
SELECT [t1].[CollectionProductId], [t1].[CollectionId], [t1].[ProductId]
FROM (
SELECT [c0].[CollectionProductId], [c0].[CollectionId], [c0].[ProductId], ROW_NUMBER() OVER(PARTITION BY [c0].[CollectionId] ORDER BY NEWID()) AS [row]
FROM [CollectionProduct] AS [c0]
) AS [t1]
WHERE [t1].[row] <= @__GetValueOrDefault_1
) AS [t0] ON [t].[CollectionId] = [t0].[CollectionId]