elenahoo7 day change - 0.05%
    Updated 2021-10-06
    with t as(
    select
    date_trunc('day',block_timestamp) as volume_date
    , sum(amount_usd) as volume
    from ethereum.dex_swaps
    where platform like '%uniswap-v3%'
    and pool_name like '%500%'
    and block_timestamp > CURRENT_DATE - 6
    group by 1
    ),
    t_fee as (select min(volume_date) as start_date
    , sum(volume)*0.0005 as total_fee_t
    from t
    ),
    with t_1 as (
    select
    date_trunc('day',block_timestamp) as volume_date
    , sum(amount_usd) as volume_t_1
    from ethereum.dex_swaps
    where platform like '%uniswap-v3%'
    and pool_name like '%500%'
    and block_timestamp > CURRENT_DATE - 13
    and block_timestamp < CURRENT_DATE - 6
    group by 1
    ),
    t_1_fee as(
    select min(volume_date) as start_date
    , sum(volume_t_1)*0.0005 as total_fee_t_1
    from t_1
    )

    select (select total_fee_t from t_fee)
    , (select total_fee_t_1 from t_1_fee)

    /*

    Run a query to Download Data