updated query to enforce the groupid
Merge pull request #375 from nZEDb/dev

updated query to enforce the groupid