Created
September 21, 2017 07:55
-
-
Save joostvanveen/2df04f1ae9da65f386904df6f7bed625 to your computer and use it in GitHub Desktop.
Export all customers from Magento 1.9.x - names & email addresses
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
-- Export all customers from Magento - names & email addresses | |
select ce.entity_id, concat(cevf.value, ' ', cevl.value) fullname, ce.email | |
from customer_entity ce | |
inner join customer_entity_varchar cevf | |
on ce.entity_id = cevf.entity_id | |
inner join eav_attribute eaf | |
on eaf.attribute_id = cevf.attribute_id | |
inner join customer_entity_varchar cevl | |
on ce.entity_id = cevl.entity_id | |
inner join eav_attribute eal | |
on eal.attribute_id = cevl.attribute_id | |
inner join eav_entity_type eet | |
on eet.entity_type_id = eal.entity_type_id = eaf.entity_type_id | |
where | |
eet.entity_type_code = 'customer' | |
and eaf.attribute_code = 'firstname' | |
and eal.attribute_code = 'lastname' | |
order by ce.entity_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment