Updating the query to be simpler