Created
March 27, 2015 20:58
-
-
Save steverobbins/f0e6e2a4fcb024c114d6 to your computer and use it in GitHub Desktop.
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
select | |
sfo.entity_id, | |
sfo.increment_id, | |
sfo.created_at, | |
sfo.status, | |
sfo.state, | |
sfo.customer_id, | |
sfo.ap21_order_id, | |
sfo.ap21_person_id, | |
ce.email, | |
cei.value | |
from sales_flat_order sfo | |
left join customer_entity ce | |
on ce.entity_id = sfo.customer_id | |
left join customer_entity_int cei | |
on cei.entity_id = ce.entity_id | |
and attribute_id = 193 | |
where | |
sfo.store_id = 7 | |
and sfo.ap21_person_id = 0 | |
order by sfo.created_at desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment