attributes: {
include: [
// count paid using case/sum via `status` != 'UNPAID'
[ sequelize.fn('sum', sequelize.literal("CASE WHEN (`Invoices`.`status` != 'UNPAID' THEN 1 ELSE 0 END")), 'paid_count' ],
// count unpaid using case/sum via `status` = 'UNPAID'
[ sequelize.fn('sum', sequelize.literal("CASE WHEN (`Invoices`.`status` = 'UNPAID' THEN 1 ELSE 0 END")), 'unpaid_count' ],
],
// ...
},