Updated 2022-12-03
    with tab1 as (select block_timestamp::date as date, receiver, amount/pow (10,decimal) as Receive_Volume
    from axelar.core.fact_transfers
    where currency = 'uaxl'
    and transfer_type in ('AXELAR','IBC_TRANSFER_IN')),
    tab2 as (
    select block_timestamp::date as date, sender, amount/pow (10,decimal) as Send_Volume
    from axelar.core.fact_transfers
    where currency = 'uaxl'
    and transfer_type in ('AXELAR','IBC_TRANSFER_OUT')),
    tab3 as (
    select tab1.date,
    receiver as AXL_Holder,
    sum (Send_Volume) as Daily_Send_Volume,
    sum (Receive_Volume) as Daily_Receive_Volume
    from tab1 join tab2 on tab1.Date = tab2.Date and Receiver = Sender
    group by 1,2),
    final_tab as (select date, AXL_Holder,
    ifnull (Daily_Receive_Volume, 0) as Daily_Receive_Volumes,
    ifnull (Daily_Send_Volume, 0) as Daily_Send_Volumes,
    Daily_Receive_Volumes - Daily_Send_Volumes as NET_AXL_Balance,
    sum (NET_AXL_Balance) over (partition by AXL_Holder order by date) as Balance
    from tab3)

    select date, Balance
    from final_tab where date >= current_date - 30


    Run a query to Download Data