iloveplushies logo

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 (41, 29, 8, 2, 23, 109, 16, 94, 7, 39, 110, 104, 26, 83, 12, 34, 107, 105, 11, 103, 24, 45, 27, 28, 108, 35, 17, 40, 106, 115, 93, 42, 1, 25, 13, 3, 49, 111, 219, 37, 36, 55, 254, 60, 233, 298, 253, 224, 43, 6, 21, 19, 18, 51, 90, 206, 221, 91, 300, 50, 4, 223, 14, 59, 53, 58, 52, 232, 56, 48, 220, 54, 38, 89, 113, 84, 30, 44, 62, 92, 32, 222, 227, 47, 226, 112, 85, 20, 264, 46, 114, 33, 217, 57, 88, 61, 218, 225, 63, 229, 64, 10) ) 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]