amirrzHyperActive Users
    Updated 2022-10-17
    with
    activeuserst1 as (
    select
    date_trunc (week,block_timestamp) as Week,
    tx_from,
    count(distinct block_timestamp::date) as Days_Count
    from
    osmosis.core.fact_transactions
    where
    tx_status = 'SUCCEEDED' group by 1,2),
    table1 as ( select
    tx_from as Active_Users
    from
    activeuserst1
    where
    days_count >= 5 group by 1 having count (distinct week) >= 68)
    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
    Run a query to Download Data