elsina2024-06-24: Number of Arbtrage transactions by each wallet copy
    Updated 2024-08-09
    WITH thorchain_swaps AS (
    SELECT
    block_timestamp AS thor_date,
    block_timestamp + INTERVAL '5 minute' AS thor_date_plus_5,
    block_timestamp - INTERVAL '5 minute' AS thor_date_minus_5,
    from_address AS thor_address,
    tx_id AS thor_tx_id,
    REGEXP_REPLACE(
    REGEXP_SUBSTR(from_asset, '([^/\\.]+$)'),
    '-.*',
    ''
    ) AS thor_from_asset,
    REGEXP_REPLACE(
    REGEXP_SUBSTR(to_asset, '([^/\\.]+$)'),
    '-.*',
    ''
    ) AS thor_to_asset,
    to_amount_usd AS thor_volume_usd
    FROM thorchain.defi.fact_swaps
    WHERE block_timestamp >= '2023-01-01'
    AND blockchain = 'ETH'
    ),
    ethereum_swaps AS (
    SELECT
    block_timestamp AS eth_date,
    block_timestamp + INTERVAL '5 minute' AS eth_date_plus_5,
    block_timestamp - INTERVAL '5 minute' AS eth_date_minus_5,
    tx_to AS eth_address,
    tx_hash AS eth_tx_hash,
    amount_in_usd AS eth_volume_usd,
    amount_out_usd AS eth_out_volume_usd,
    symbol_in AS eth_symbol_in,
    symbol_out AS eth_symbol_out
    FROM polygon.defi.ez_dex_swaps
    WHERE block_timestamp >= '2023-01-01'
    ),
    QueryRunArchived: QueryRun has been archived