Query editor
withdeposits as (selecttransfers.block_time,transfers.tx_hash,transfers.contract_address,transfers."from" as wallet_address,transfers.amount_raw,transfers.amount,transfers.price_usd,transfers.amount_usdfrom tokens.transfers transfersjoin {{blockchain}}.transactions transactionson transfers.tx_hash = transactions.hashwheretransfers.blockchain = '{{blockchain}}'and(transfers.contract_address = {{tokenA_contract}}or transfers.contract_address = {{tokenB_contract}})and transfers."to" = {{lp_contract}}and (cast(transactions.data as varchar) like '%{{deposit_method_id}}%'or cast(transactions.data as varchar) like '%{{increase_method_id}}%')),withdrawals as (selecttransfers.block_time,transfers.tx_hash,transfers.contract_address,transfers."to" as wallet_address,-transfers.amount_raw,-transfers.amount,-transfers.price_usd,-transfers.amount_usdfrom tokens.transfers transfersjoin {{blockchain}}.transactions transactionson transfers.tx_hash = transactions.hashwheretransfers.blockchain = '{{blockchain}}'and (transfers.contract_address = {{tokenA_contract}}or transfers.contract_address = {{tokenB_contract}})and transfers."from" = {{lp_contract}}and (cast(transactions.data as varchar) like '%{{withdraw_method_id}}%'or cast(transactions.data as varchar) like '%{{decrease_method_id}}%'))select * from depositsunion allselect * from withdrawalsorder by block_time