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