Okay, here are some examples of some queries you can run. Please use caution if you run any of these; they cannot be undone! I would recommend running this on an offline backup first to test things out, unless you don't mind messing up who-has-what for group images, if you were to make a mistake.

SQL Query
UPDATE ubbt_USER_PROFILE
SET USER_GROUP_IMAGES = ''
This one would blank all users' group images, if you wanted to start from a clean slate.

SQL Query
UPDATE ubbt_USER_PROFILE
SET USER_GROUP_IMAGES = 'a:1:{i:1;s:1:"6";}'
WHERE USER_ID = '123'
This would set user 123's group image to be the group image of group 6. This will overwrite any pre-existing group image settings for this user and replace it with only the group 6 image.

SQL Query
UPDATE ubbt_USER_PROFILE AS up, ubbt_USER_GROUPS AS ug
SET up.USER_GROUP_IMAGES = 'a:1:{i:1;s:1:"6";}'
WHERE ug.GROUP_ID = '6'
AND ug.USER_ID = up.USER_ID
This would set the group image to 6 for all users who are in group 6. This will overwrite any pre-existing group image settings for these members and replace it with only the group 6 image.