sql querries to delete unused groups;