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