SQL query to delete all abandoned carts in Prestashop

Database of your Prestashop project could be really huge after some time because of all the junk stats related data. The most of such data is not needed at all and it is only takes space on your server and slows the whole project down significantly. The best example is garbage data represent abandoned carts. Here are 2 simple SQL queries you can run on your database ( for example using phpmyadmin) to get rid of unwanted data.

Don’t forget to make a backup first!

Run these two queries on the database: (you can use phpmyadmin for it for example)