That query is ok if you only want to update the default group, not for for reassigning other groups for the respective customer accounts.
Also not everyone searching for a solution to the same problem as yours want to waste the time to learn SQL and might prefer a ready made alternative / GUI interface.