Skip to content

Instantly share code, notes, and snippets.

@magentogirl
Created May 8, 2014 15:40
Show Gist options
  • Save magentogirl/1a5f73cf8174e57c2792 to your computer and use it in GitHub Desktop.
Save magentogirl/1a5f73cf8174e57c2792 to your computer and use it in GitHub Desktop.
Magento Enterprise Report of Customers with a Store Credit Balance
select customer_id, email, f.value, l.value, amount from enterprise_customerbalance b join customer_entity c on
b.customer_id=c.entity_id
left join customer_entity_varchar f on c.entity_id =f.entity_id
left join customer_entity_varchar l on c.entity_id =l.entity_id
where amount>0 and f.attribute_id=5 and l.attribute_id=7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment