• Leave it to Jeff to come up with a solution. It's a good one as well.

    You want to think pattern, working all rows at once from the pattern perspective, as Jeff has done, and letting the server do the hard work across all rows.