Mysql – delete all customers with email ending with example.com with specific DATE period

MySQL

delete all customers with email ending with example.com using mysql with specific DATE period from 9/15/2018 to 9/28/2018

Best Answer

Something like this:

delete customers
where email like '%example.com'
and date_created between '2018-09-15' AND '2018-09-28';

But first, run a select to see if it will delete the correct rows:

select * from customers
where email like '%example.com'
and date_created between '2018-09-15' AND '2018-09-28';