MySQL Query fix

Fix for MySQL query to correctly calculate available contacts in groups with recognition of missing accounts and shawly deleted accounts.