query returning grouped eos by prospect