My first implementation I tried using includeMap. The main reason I wanted to avoid that was so that sequelize.col() could be used elsewhere with the same logic, when includeMap isn't available.

NB at the moment col() throws an error if you use it in this way outside of an order/group clause - I intended to extend it to work later, but wanted to check first if it'd break any other functionality, so thought I'd just get it working with order/group and then discuss how to extend.

Does that make sense?

As far as being not being pretty is concerned, I can re-write this section to be clearer if you like.