Query editor
WITHwithdrawals_arbitrum AS (SELECT evt_block_time AS block_time, CAST(evt_tx_hash AS VARCHAR) AS tx_hash, 'arbitrum' AS chain,CAST(brokerHash AS VARCHAR) AS broker_hash,CAST(NULL AS BIGINT) AS broker_index,tokenHash AS token_hash, tokenAmount AS token_amount, fee AS withdraw_fee,CAST(sender AS VARCHAR) AS sender, CAST(receiver AS VARCHAR) AS receiver,CAST(NULL AS TIMESTAMP) AS ts_cutover_mcFROM orderly_arbitrum.vault_arbitrum_evt_AccountWithdraw),withdrawals_optimism AS (SELECT evt_block_time AS block_time, CAST(evt_tx_hash AS VARCHAR) AS tx_hash, 'optimism' AS chain,CAST(brokerHash AS VARCHAR) AS broker_hash,CAST(NULL AS BIGINT) AS broker_index,tokenHash AS token_hash, tokenAmount AS token_amount, fee AS withdraw_fee,CAST(sender AS VARCHAR) AS sender, CAST(receiver AS VARCHAR) AS receiver,CAST(NULL AS TIMESTAMP) AS ts_cutover_mcFROM orderly_optimism.vault_optimism_evt_AccountWithdraw),withdrawals_polygon AS (SELECT evt_block_time AS block_time, CAST(evt_tx_hash AS VARCHAR) AS tx_hash, 'polygon' AS chain,CAST(brokerHash AS VARCHAR) AS broker_hash,CAST(NULL AS BIGINT) AS broker_index,tokenHash AS token_hash, tokenAmount AS token_amount, fee AS withdraw_fee,CAST(sender AS VARCHAR) AS sender, CAST(receiver AS VARCHAR) AS receiver,CAST(NULL AS TIMESTAMP) AS ts_cutover_mcFROM orderly_polygon.vault_polygon_evt_AccountWithdraw),withdrawals_base AS (SELECT evt_block_time AS block_time, CAST(evt_tx_hash AS VARCHAR) AS tx_hash, 'base' AS chain,CAST(brokerHash AS VARCHAR) AS broker_hash,CAST(NULL AS BIGINT) AS broker_index,tokenHash AS token_hash, tokenAmount AS token_amount, fee AS withdraw_fee,CAST(sender AS VARCHAR) AS sender, CAST(receiver AS VARCHAR) AS receiver,CAST(NULL AS TIMESTAMP) AS ts_cutover_mcFROM orderly_base.vault_base_evt_AccountWithdraw),withdrawals_mantle AS (SELECT evt_block_time AS block_time, CAST(evt_tx_hash AS VARCHAR) AS tx_hash, 'mantle' AS chain,CAST(brokerHash AS VARCHAR) AS broker_hash,CAST(NULL AS BIGINT) AS broker_index,tokenHash AS token_hash, tokenAmount AS token_amount, fee AS withdraw_fee,CAST(sender AS VARCHAR) AS sender, CAST(receiver AS VARCHAR) AS receiver,CAST(NULL AS TIMESTAMP) AS ts_cutover_mcFROM orderly_mantle.vault_mantle_evt_AccountWithdraw),withdrawals_ethereum AS (SELECT evt_block_time AS block_time, CAST(evt_tx_hash AS VARCHAR) AS tx_hash, 'ethereum' AS chain,CAST(brokerHash AS VARCHAR) AS broker_hash,CAST(NULL AS BIGINT) AS broker_index,tokenHash AS token_hash, tokenAmount AS token_amount, fee AS withdraw_fee,CAST(sender AS VARCHAR) AS sender, CAST(receiver AS VARCHAR) AS receiver,CAST(NULL AS TIMESTAMP) AS ts_cutover_mcFROM orderly_ethereum.vault_ethereum_evt_AccountWithdraw),withdrawals_sei AS (SELECT evt_block_time AS block_time, CAST(evt_tx_hash AS VARCHAR) AS tx_hash, 'sei' AS chain,CAST(brokerHash AS VARCHAR) AS broker_hash,CAST(NULL AS BIGINT) AS broker_index,