Opencart - SQL to Delete customers of a specifi Users Group and move all the customers to the 1st users group
In this example we delete all the customers of the group with ID 3 and move all the other customers to the first group DELETE FROM oc_customer_activity WHERE customer_id IN ( SELECT oc_customer.customer_id FROM `oc_customer` where customer_group_id != 3 ); DELETE FROM oc_customer_history WHERE customer_id IN ( SELECT oc_customer.customer_id FROM `oc_customer` where customer_group_id != 3 ); DELETE FROM oc_customer_ip WHERE customer_id IN ( SELECT oc_customer.customer_id FROM `oc_customer` where customer_group_id != 3 ); DELETE FROM oc_customer_online WHERE customer_id IN ( SELECT oc_customer.customer_id FROM `oc_customer` where customer_group_id != 3 ); DELETE FROM oc_customer_reward WHERE customer_id IN ( SELECT oc_customer.customer_id FROM `oc_customer` where customer_group_id != 3 ); DELETE FROM oc_customer_transaction WHERE customer_id IN ( SELECT oc_customer.customer_id FROM `oc_customer` where customer_gr...