SalehE-F-B-swaps
    Updated 2022-10-02
    with lst_post as (
    select
    block_timestamp::date as date
    ,count(tx_hash) as swaps
    ,count(DISTINCT origin_from_address) as swapers
    ,sum(amount_in_usd) as amount_usd
    ,sum(swaps) over (order by date) as growth_swaps
    ,sum(swapers) over (order by date) as growth_swapers
    ,sum(amount_usd) over (order by date) as growth_amount_usd
    from ethereum.core.ez_dex_swaps
    where block_timestamp::date >='2022-09-15'
    group by 1
    order by 1
    )
    ,lst_before as (
    select
    block_timestamp::date as date
    ,count(tx_hash) as swaps
    ,count(DISTINCT origin_from_address) as swapers
    ,sum(amount_in_usd) as amount_usd
    ,sum(swaps) over (order by date) as growth_swaps
    ,sum(swapers) over (order by date) as growth_swapers
    ,sum(amount_usd) over (order by date) as growth_amount_usd
    from ethereum.core.ez_dex_swaps
    where block_timestamp::date >='2022-08-28' and block_timestamp::date <'2022-09-15'
    group by 1
    order by 1
    )
    select 'Before_Merge' as type,* from lst_before
    union all
    select 'After_Merge' as type,* from lst_post

    Run a query to Download Data