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
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com | |
# See https://www.byte.nl/blog/magento-cacheleak-issue | |
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!! | |
user app; | |
worker_processes 4; | |
pid /var/run/nginx.pid; | |
events { |
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 b.email, c.value AS name, a.updated_at, d.added_at, d.product_id, e.name, SUM(g.qty_ordered) AS purchased | |
FROM `wishlist` AS a | |
INNER JOIN customer_entity AS b ON a.customer_id = b.entity_id | |
INNER JOIN customer_entity_varchar AS c ON a.customer_id = c.entity_id AND c.attribute_id = (SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'firstname' AND entity_type_id = b.entity_type_id) | |
INNER JOIN wishlist_item AS d ON a.wishlist_id = d.wishlist_id | |
INNER JOIN catalog_product_flat_1 AS e ON d.product_id = e.entity_id | |
LEFT JOIN sales_flat_order AS f ON f.customer_email = b.email | |
LEFT JOIN sales_flat_order_item AS g ON (f.entity_id = g.order_id AND g.sku LIKE CONCAT(e.sku,'%') AND g.product_type = 'simple') | |
GROUP BY b.email, c.value, a.updated_at, d.added_at, d.product_id, e.name |