Last active
April 10, 2017 22:00
-
-
Save steverobbins/f3badadf532f3c8754988d8a6c7d0f42 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 | |
q.entity_id | |
, q.created_at | |
, q.updated_at | |
, q.base_grand_total | |
, q.customer_id | |
, q.customer_email | |
, q.reserved_order_id | |
, o.increment_id actual_order_id | |
from mage_sales_flat_quote q | |
left join mage_sales_flat_order o on o.quote_id = q.entity_id | |
where ( | |
q.created_at >= (select created_at from mage_sales_flat_order where increment_id = 249749) | |
or q.updated_at >= (select created_at from mage_sales_flat_order where increment_id = 249749) | |
) and ( | |
q.created_at <= (select created_at from mage_sales_flat_order where increment_id = 249778) | |
or q.updated_at <= (select created_at from mage_sales_flat_order where increment_id = 249778) | |
) | |
order by q.reserved_order_id desc, q.updated_at desc, q.created_at desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment