Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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