Added ability to perform STAT relations on arbitrary columns.