I am trying to get the count by subtracting all records that have false from all the records that have true. I am unable to replicate such a thing in Sequelize but I was able to create it in a raw query:
SELECT (SELECT Count(id)
FROM votes
WHERE up = true
AND id = 1) - (SELECT Count(id)
FROM votes
WHERE up = false
AND id = 1) AS votes
Based off the documentation, I do not see a way to do such a thing. Is there anything that I am missing?