ea1371Active Users: Number of Actions and Users
    Updated 2022-10-17
    with table1 as (
    select date_trunc (week,block_timestamp) as Week,
    tx_from as Active_Users,
    count (distinct block_timestamp::date) as Days_Count
    from osmosis.core.fact_transactions
    where tx_status = 'SUCCEEDED'
    group by 1,2 having days_count >= 5)

    select 'Swap' as Action_Type,
    count (distinct tx_id) as TX_Count,
    count (distinct trader) as Users_Count
    from osmosis.core.fact_swaps
    where tx_status = 'SUCCEEDED'
    and trader in (select active_users from table1)

    union ALL

    select 'Liquidity Providing' as Action_Type,
    count (distinct tx_id) as TX_Count,
    count (distinct liquidity_provider_address) as Users_Count
    from osmosis.core.fact_liquidity_provider_actions
    where tx_status = 'SUCCEEDED'
    and liquidity_provider_address in (select active_users from table1)
    Run a query to Download Data