I need a report that provides me who purchased a specific product. For example, I have product ABC. 150 units sold for this product. How do I get a list of the people who purchased product ABC.
Product Customer Cost ABC John Smith $23.99 ABC Jennifer Gray $23.99
SELECT P.Name, C.Username, PV.PriceInclTax FROM Nop_Order AS O INNER JOIN Nop_OrderProductVariant AS PV ON O.OrderID = PV.OrderID INNER JOIN Nop_Customer AS C ON O.CustomerID = C.CustomerID INNER JOIN Nop_ProductVariant AS NPV ON PV.ProductVariantID = NPV.ProductVariantId INNER JOIN Nop_Product AS P ON NPV.ProductID = P.ProductId where P.Name = 'ABC'
Thanks Skiltz! Your post pointed me in the right direction and gave me the insight I was looking for. Ultimately, I was able to formalize my query by aliasing the returned columns and drilling down into the Nop_CustomerAttributes table to find the FirstName and LastName attributes.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.