added first getGroups implementation for both MySQL and MSSQL