honeysql

Discussion of https://github.com/seancorfield/honeysql :slightly_smiling_face:
ag 2018-07-06T23:31:49.000025Z

can someone guide me how to turn complicated query like this to honeysql syntax

select sub.*, sub.debits - sub.credits net from
               (select sum(case when debit_or_credit = 'debit' then transaction_amount else 0 end) debits,
                       sum(case when  debit_or_credit = 'credit' then transaction_amount else 0 end) credits
               from (select * from transactions)

ag 2018-07-06T23:32:14.000061Z

I'm getting stuck at sum(case when thing