Afonso_DiazUntitled Query
    Updated 2023-02-11
    with t1 as (
    select
    recorded_at::date as day,
    avg(price) as price_usd
    from osmosis.core.dim_prices
    where symbol='OSMO'
    group by 1
    )

    select
    liquidity_provider_address as user,
    count(distinct tx_id) as txns_count,
    sum(price_usd * (amount / pow(10, decimal))) as volume_usd,
    avg(price_usd * (amount / pow(10, decimal))) as average_volume_usd
    from osmosis.core.fact_liquidity_provider_actions
    join t1
    on block_timestamp::date = day
    where action = 'pool_joined'
    and block_timestamp > current_date - interval '3 months'
    group by 1
    order by 2 desc
    limit 10
    Run a query to Download Data