For all users that query would be:
UPDATE oc_preferences SET configvalue='0'
WHERE configkey='notify_email_group_settings';
To only set it for a specific user you would add:
AND userid='USERID'
Make sure to make a backup of your database before trying it, just in case.
It might also be noteworthy that this line only seems to exist if users actively changed this setting before. If it hasn’t been changed by a user the default setting most probably applies to them as well.
You can check that by running:
select * from oc_preferences where configkey='notify_email_group_settings';