Ali3NTotal $AXL Balance on Osmosis and Axelar
    Updated 2022-11-29
    with sendtable as (
    select sender,
    sum (amount/pow(10,decimal)) as Sent_Volume
    from axelar.core.fact_transfers
    where currency = 'uaxl'
    and tx_succeeded = 'TRUE'
    group by 1),

    receivetable as (
    select receiver,
    sum (amount/pow(10,decimal)) as Receive_Volume
    from axelar.core.fact_transfers
    where currency = 'uaxl'
    and tx_succeeded = 'TRUE'
    group by 1)

    select 'Osmosis' as chain,
    sum (balance/pow(10,decimal)) as Balance
    from osmosis.core.fact_daily_balances
    where currency = 'ibc/903A61A498756EA560B85A85132D3AEE21B5DEDD41213725D22ABF276EA6945E'
    and date = (select max(date) from osmosis.core.fact_daily_balances)

    union ALL

    select 'Axelar' as chain,
    sum (receive_volume - sent_volume)
    from sendtable t1 join receivetable t2 on t1.sender = t2.receiver

    Run a query to Download Data