SELECT
sum(colat.amount) as callateral
from algorand.transactions ac
join algorand.payment_transaction colat on ac.tx_group_id = colat.tx_group_id and colat.receiver != 'MTMJ5ADRK3CFG3HGUI7FS4Y55WGCUO5CRUMVNBZ7FW5IIG6T3IU2VJHUMM'
where ac.BLOCK_TIMESTAMP::date >= '2022-03-31'
-- and ac.tx_group_id = 'juSDgh3pvYM/BINfjj4p8c7Zl2EImPJIBBiK8Gdfisg='
and TRY_BASE64_DECODE_STRING(ac.tx_message:txn:apaa[0]::STRING) = 'NewPosition'
and ac.tx_message:txn:apid::string = '684650147'