amir007-Q63RX1USDC Transfers - Axelar
    Updated 2022-11-21
    with price as
    (
    select recorded_at::date as date
    , avg(price) as avg_price
    from osmosis.core.dim_prices
    where recorded_at::date > current_date() - interval '{{TimePeriod}} {{PeriodType}}'
    and symbol = 'axlUSDC'
    group by 1
    ), raw_data as
    (
    select block_timestamp::date as date
    , sender
    , receiver
    , (amount / pow(10, decimal)) as amount
    , (amount / pow(10, decimal)) * avg_price as amount_usd
    from axelar.core.fact_transfers trn
    join price prc on trn.block_timestamp::date = prc.date
    where block_timestamp::date > current_date() - interval '{{TimePeriod}} {{PeriodType}}'
    and currency = 'uusdc' and tx_succeeded = 'TRUE'
    )
    select sum(amount_usd) as "Sum Amount ($)"
    , avg(amount_usd) as "Average Amount ($)"
    , count(distinct sender) as "Count of Wallet (#)"
    from raw_data

    Run a query to Download Data