Updating the query to be simpler
Merge pull request #208 from edx/sanchez/peer_query_optimization

WIP: Updating the query to be simpler