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