super nitpick: Just a little style thing - would be nice to indent these predicates linked to the JOIN a smidge to differentiate them from stuff in the WHERE block.