I am trying to perform an eagerload query in sequelize javascript where I query the sum of two columns fronm two different tables and calculate their difference, then return the result instantly.
How can I go about this ?
here is the sql query
select ( (select sum(amount) from payment as payments where Client_phone_number = '671273724') - (select sum(unit_price * duration) from calls as bill where Client_phone_number = '671273724'))