CORE: fixed getGroupUsers select for Postgres

- Fixed typo in SQL select
- Added test for getGroupUsers method