NuveveCryptoArchivedAccumulated Monthly Revenue
    Updated 2023-07-14
    with ethereum as (
    select
    date_trunc('month', block_timestamp::date) as month,
    sum(amount_usd) as total_usd,
    (
    select sum(amount_usd)
    from ethereum.core.ez_eth_transfers as e2
    where e2.eth_to_address = '0x4d73adb72bc3dd368966edd0f0b2148401a178e2'
    and date_trunc('month', e2.block_timestamp::date) <= date_trunc('month', e1.block_timestamp::date)
    ) as c_total_usd
    from ethereum.core.ez_eth_transfers as e1
    where eth_to_address = '0x4d73adb72bc3dd368966edd0f0b2148401a178e2'
    group by date_trunc('month', block_timestamp::date)
    order by month
    ),

    avax as (
    select
    date_trunc('month', block_timestamp::date) as month,
    sum(amount_usd) as total_usd,
    (
    select sum(amount_usd)
    from avalanche.core.ez_avax_transfers as e2
    where e2.avax_to_address = '0x4d73adb72bc3dd368966edd0f0b2148401a178e2'
    and date_trunc('month', e2.block_timestamp::date) <= date_trunc('month', e1.block_timestamp::date)
    ) as c_total_usd
    from avalanche.core.ez_avax_transfers as e1
    where avax_to_address = '0x4d73adb72bc3dd368966edd0f0b2148401a178e2'
    group by date_trunc('month', block_timestamp::date)
    order by month
    ),

    bsc as (
    select
    date_trunc('month', block_timestamp::date) as month,
    sum(amount_usd) as total_usd,
    Run a query to Download Data