Fixed group fetching query