Query editor
withsusd_transfer as (selectvalue / 1e18 as value,evt_block_time,evt_tx_hashfromerc20_ethereum.evt_Transferwhere`to` = lower('0xfeEFEEfeefEeFeefEEFEEfEeFeefEEFeeFEEFEeF')and contract_address = lower('0x57Ab1ec28D129707052df4dF418D58a2D46d5f51')),loan_tracking as (select*,'loan' as tx_typefrom(selectevt_tx_hashfromsynthetix_ethereum.CollateralErc20_evt_LoanClosedunionselectevt_tx_hashfromsynthetix_ethereum.CollateralErc20_evt_LoanClosedByLiquidationunionselectevt_tx_hashfromsynthetix_ethereum.CollateralErc20_evt_LoanCreatedunionselectevt_tx_hashfromsynthetix_ethereum.CollateralErc20_evt_LoanDrawnDownunionselectevt_tx_hashfromsynthetix_ethereum.CollateralErc20_evt_LoanPartiallyLiquidatedunionselectevt_tx_hashfromsynthetix_ethereum.CollateralErc20_evt_LoanRepaymentMade)),wrapper_tracking as (--0x02f9bC46beD33acdB9cb002fe346734CeF8a9480select evt_tx_hash, tx_type from (selectvalue / 1e18 as value,evt_block_time,evt_tx_hash,'wrapper' as tx_type