Forked from oscar-reales-interactiv4/quote-cleaning.sql
Created
February 12, 2014 23:06
-
-
Save oreales/8966378 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
#PARA CUSTOMERS borrando QUOTES más antiguas de 45 días | |
#DELETE FROM sales_flat_quote WHERE (NOT ISNULL(customer_id) AND customer_id != 0) AND updated_at < DATE_SUB(Now(), INTERVAL 45 DAY) LIMIT 15000; | |
SELECT * FROM sales_flat_quote WHERE (NOT ISNULL(customer_id) AND customer_id != 0) AND updated_at < DATE_SUB(Now(), INTERVAL 45 DAY) LIMIT 15000; | |
#PARA NO CUSTOMERS borrando QUOTES más antiguas de 30 días. | |
#DELETE FROM sales_flat_quote WHERE (ISNULL(customer_id) || customer_id = 0) AND updated_at < DATE_SUB(Now(), INTERVAL 30 DAY); | |
SELECT * FROM sales_flat_quote WHERE (ISNULL(customer_id) || customer_id = 0) AND updated_at < DATE_SUB(Now(), INTERVAL 30 DAY) LIMIT 50000; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment