Sbhn_NPwAssets 2
    Updated 2023-02-14
    with pricee as (
    select currency,
    avg(price) as usdprice
    from osmosis.core.ez_prices
    group by 1
    )
    SELECT
    date_trunc('month', block_timestamp) as date,
    project_name,
    sum(amount/pow(10, decimal)*usdprice) as total_volume,
    avg(amount/pow(10, decimal)*usdprice) as average_volume,
    sum(total_volume) over (order by date) as cum_vol,
    COUNT(DISTINCT tx_id) as bridges
    FROM osmosis.core.fact_transfers a
    LEFT outer JOIN osmosis.core.dim_labels b
    ON b.address = a.currency
    join pricee c on a.currency=c.currency
    where project_name in ('wBNB','wMATIC','wAVAX')
    AND sender LIKE 'axelar%'
    AND receiver LIKE 'osmo%'
    group by 1,2
    Run a query to Download Data