-
-
Save stnc/c11bdcf69a2c8f25e157473556c5ec4f to your computer and use it in GitHub Desktop.
MYSQL RAW SELECTS FOR MAGENTO
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
# Get Customers taxvat | |
SELECT ce.*, ea.attribute_code, cev.value | |
FROM customer_entity AS ce | |
LEFT JOIN eav_attribute AS ea ON ce.entity_type_id = ea.entity_type_id AND ea.backend_type = 'varchar' | |
LEFT JOIN customer_entity_varchar AS cev ON ce.entity_id = cev.entity_id AND ea.attribute_id = cev.attribute_id | |
WHERE ea.attribute_code = 'taxvat'; | |
# Get Customer Data from orders | |
SELECT `increment_id`, `customer_id`, `customer_firstname`, `customer_email`, `customer_taxvat` FROM `sales_flat_order`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment