shawnedwards2023-04-20 08:01 PM
    Updated 2023-04-20
    with base as (
    (select
    ADDRESS,
    'Osmosis' as chain ,
    sum(balance/pow(10,decimal)) as usdc_holding
    from
    osmosis.core.fact_daily_balances
    where currency = 'ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858'
    and DATE::date = CURRENT_DATE - 1

    group by 1)
    union all ------------------------axlusdc---------------------------
    (with
    token_out as (
    select
    sender ,
    sum(amount/pow(10,decimal)) amt_out
    from axelar.core.fact_transfers
    where 1 = 1
    and sender is not null
    and currency = 'uusdc'
    and TX_SUCCEEDED = 'TRUE'
    group by 1
    )
    , token_in as (
    select
    receiver ,
    sum(amount/pow(10,decimal)) amt_in
    from axelar.core.fact_transfers
    Run a query to Download Data