Last active
August 29, 2015 14:13
-
-
Save kbariotis/cad6e13f3d0c50078d63 to your computer and use it in GitHub Desktop.
Magento's Product Buyers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT o.customer_id, ce.email FROM sales_flat_order_item i | |
JOIN sales_flat_order o ON o.entity_id = i.order_id | |
JOIN customer_entity ce ON ce.entity_id = o.customer_id | |
WHERE o.customer_id IS NOT NULL | |
AND i.sku = 'PRODUCT_SKU' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment