Afonso_Diaz2023-04-18 05:37 PM
    Updated 2023-04-18
    with
    t as (
    select
    recorded_hour::date as date,
    currency,
    symbol,
    avg(price) as price_usd
    from osmosis.core.ez_prices
    group by 1, 2, 3
    )

    select
    action,
    count(distinct tx_id) as transactions,
    count(distinct liquidity_provider_address) as users,
    sum(price_usd * amount) as volume_usd,
    avg(price_usd * amount) as average_volume_usd
    from osmosis.mars.ez_liquidity_provider_actions a
    join t
    on block_timestamp::date = date and t.currency = a.currency
    where block_timestamp >= '2023-01-01' and block_timestamp < '2023-04-01'
    group by 1

    Run a query to Download Data