When looking at sales_flat_quote (M1) or quote (M2) table, there are many quotes stuck at is_active=1. Even though there is a sale in sales_flat_order / sales_order.
This does not seem to have a relation to the state of the order (finding complete/processing/canceled orders), nor payment method (finding paypal, checkmo and 3rd party gateway orders).
When joining the quote and sales tables to find orders with 'open' quotes, I find many results on several shops that we manage.
I'm using this query on M1:
SELECT `sales_flat_order`.`state`,
`sales_flat_order`.`increment_id`,
`sales_flat_order`.`entity_id`,
`sales_flat_order`.`created_at`,
`sales_flat_order`.`quote_id`,
`sales_flat_quote`.`is_active`,
`sales_flat_quote`.`customer_email`,
`sales_flat_order_payment`.`method`
FROM `sales_flat_order`
LEFT JOIN sales_flat_quote ON `sales_flat_order`.`quote_id`=`sales_flat_quote`.`entity_id`
LEFT JOIN `sales_flat_order_payment` ON sales_flat_order.`entity_id`=sales_flat_order_payment.`parent_id`
WHERE `sales_flat_quote`.`is_active` = 1;
and this one on M2:
SELECT `sales_order`.`state`,
`sales_order`.`increment_id`,
`sales_order`.`entity_id`,
`sales_order`.`created_at`,
`sales_order`.`quote_id`,
`quote`.`is_active`,
`quote`.`customer_email`,
`sales_order_payment`.`method`
FROM `sales_order`
LEFT JOIN quote ON `sales_order`.`quote_id`=`quote`.`entity_id`
LEFT JOIN `sales_order_payment` ON sales_order.`entity_id`=sales_order_payment.`parent_id`
WHERE `quote`.`is_active` = 1;
Am I looking at this the wrong way? Can people confirm the same thing for their M1/M2 shop?