Created
June 18, 2018 13:21
-
-
Save chakravarthykalyan90/11f847c6731c55ba4649d6d7d4fe0771 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 `quote_id`, | |
COUNT(`quote_id`) AS `duplicate_count`, | |
`increment_id` AS `first_increment_id`, | |
GROUP_CONCAT( `increment_id` SEPARATOR ' | ' ) AS `increment_ids`, | |
`created_at`, | |
`state`, | |
`status`, | |
`customer_email`, | |
`grand_total` | |
FROM `sales_flat_order` | |
GROUP BY `quote_id` | |
HAVING COUNT(`quote_id`) > 1 | |
ORDER BY `created_at` ASC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment