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