Who ordered what in Magento webshop with a query on db?
Answer
Correct Answer: SELECT e.*, sfoi.*, sfoa.lastname, sfoa.email, sfoa.street, sfoa.postcode, sfoa.country_id FROM sales_flat_order e INNER JOIN sales_flat_order_item sfoi ON (e.entity_id=sfoi.order_id) INNER JOIN sales_flat_order_address sfoa ON (e.entity_id=sfoa.parent_id) WHERE date_format(e.created_at, '%Y') LIKE '2015' AND sfoi.parent_item_id IS NULL AND sfoi.qty_ordered > 0;
Explanation:
Note: This Question is unanswered, help us to find answer for this one