mmdrezaNumber of Average Active Liquidity providers per week
    Updated 2022-10-18
    with tab as (
    select date_trunc ('week',block_timestamp) as date,
    liquidity_provider_address as providers,
    count (distinct tx_id) as transactions_count
    from osmosis.core.fact_liquidity_provider_actions
    where tx_status = 'SUCCEEDED'
    group by 1,2
    having transactions_count >= 20),

    tab2 as (select
    date,
    count (distinct providers) as active_providers
    from tab
    group by date)

    select avg(active_providers) as avg_providers from tab2



    Run a query to Download Data