Abolfazl_771025daily swap activity
    Updated 2022-09-30
    with main as (select
    distinct miner
    from ethereum.core.fact_blocks
    where miner is not null
    )
    select
    'before Merge' as period,
    date_trunc('day', block_timestamp) as date,
    count(TX_HASH) as "count of swaps",
    count(distinct origin_from_address) as "count of users",
    sum(amount_in) as "swaped volume (ETH)"
    from ethereum.core.ez_dex_swaps a
    left join main b on a.origin_from_address=b.miner
    where symbol_in = 'WETH'
    and block_timestamp::date between '2022-09-01' and '2022-09-15 06:46:00.000'
    group by 1,2
    union
    select
    'after Merge' as period,
    date_trunc('day', block_timestamp) as date,
    count(TX_HASH) as "count of swaps",
    count(distinct origin_from_address) as "count of users",
    sum(amount_in) as "swaped volume (ETH)"
    from ethereum.core.ez_dex_swaps a
    left join main b on a.origin_from_address=b.miner
    where symbol_in = 'WETH'
    and block_timestamp::date > '2022-09-15 06:46:00.000'
    group by 1,2
    Run a query to Download Data