Throw ISE if selectAll query has no results.