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 (65, 66, 79, 82, 81, 80, 101, 100, 72, 71, 77, 67, 95, 99, 68, 74, 230, 97, 70, 73, 98, 75, 96, 78, 102, 297, 76) ) 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]