1

I have few accounts with same details except different email. Is there any way to figure out their details ? like selecting emails which have same first name & last name using an SQL query ?

1 Answer 1

1

It doesn't really scale well, but here you go:

select attribute_id into @firstname from eav_attribute where entity_type_id = 1 and attribute_code = 'firstname';
select attribute_id into @lastname from eav_attribute where entity_type_id = 1 and attribute_code = 'lastname';
select count(email), group_concat(email), cev_fn.value as firstname, cev_ln.value as last name
    from customer_entity ce
    inner join customer_entity_varchar cev_fn on cev_fn.entity_id = ce.entity_id and cev_fn.attribute_id = @firstname
    inner join customer_entity_varchar cev_ln on cev_ln.entity_id = ce.entity_id and cev_ln.attribute_id = @lastname
    group by cev_fn.value, cev_ln.value having count(email) > 1
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.