Created
July 20, 2016 17:20
-
-
Save Tomasz-Silpion/01ab5349244941f0c21b97aca5fa0677 to your computer and use it in GitHub Desktop.
Get all customers payment methods between range of dates from Magento database
This file contains hidden or 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 | |
o.grand_total AS 'Order Total', | |
o.created_at AS 'Payment Day', | |
p.method AS 'Payment Method', | |
CONCAT_WS(' ', o.customer_firstname, o.customer_lastname) AS 'Customer Name', | |
o.increment_id AS 'Order Number' | |
FROM sales_flat_order o | |
LEFT JOIN sales_flat_order_payment p ON p.entity_id = o.entity_id | |
WHERE (o.created_at BETWEEN '2016-01-01' AND '2016-12-31') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment