Query editor
withokx_ethereum_tx AS (SELECTtx_hash,block_timeFROMdune.okxweb3wallet.result_okx_eth_tx),okx_bnb_tx AS (SELECTtx_hash,block_timeFROMdune.okxweb3wallet.result_dex_project_volume_bsc),okx_arbitrum_tx AS (SELECTtx_hash,block_timeFROMquery_4899526),okx_base_tx AS (SELECTtx_hash,block_timeFROMquery_4899451),okx AS (SELECT*FROMdex.trades AS aINNER JOIN okx_{{blockchain}}_tx AS b ON a.tx_hash = b.tx_hashWHEREa.blockchain = '{{blockchain}}'AND(((a.token_bought_symbol = '{{token1}}' OR '{{token1}}' = '*')AND(a.token_sold_symbol = '{{token2}}' OR '{{token2}}' = '*'))OR((a.token_bought_symbol = '{{token2}}' OR '{{token2}}' = '*')AND(a.token_sold_symbol = '{{token1}}' OR '{{token1}}' = '*')))AND(amount_usd >= {{amount_threshold}}OR{{amount_threshold}} = 0))