misaghlbETH Merge: Selling Event?
    Updated 2022-09-29
    with miner_wallets as (
    select DISTINCT miner from ethereum.core.fact_blocks where network='mainnet'
    )
    SELECT
    date(block_timestamp) as date,
    count(DISTINCT SENDER) as senders,
    sum(amount_in) as vol,
    'Non-Miner Sell' as type
    FROM ethereum.core.ez_dex_swaps
    WHERE SYMBOL_IN = 'WETH'
    AND block_timestamp >= '2022-09-01'
    GROUP by date

    UNION ALL
    SELECT
    date(block_timestamp) as date,
    count(DISTINCT SENDER) as senders,
    sum(amount_out) as vol,
    'Non-Miner Buy' as type
    FROM ethereum.core.ez_dex_swaps
    WHERE SYMBOL_OUT = 'WETH'
    AND block_timestamp >= '2022-09-01'
    GROUP by date
    UNION ALL
    SELECT
    date(block_timestamp) as date,
    count(DISTINCT SENDER) senders,
    sum(amount_in) as vol,
    'Miner Sell' as type
    FROM ethereum.core.ez_dex_swaps
    WHERE SYMBOL_IN = 'WETH'
    AND block_timestamp >= '2022-09-01'
    AND SENDER in (SELECT miner from miner_wallets)
    Run a query to Download Data