MahrooTotal Number of Active Users copy copy
    Updated 2023-02-12
    -- forked from 6342756f-a230-42c3-9fda-5e1c6f3c2223

    -- forked from fad801ea-ef7b-44a3-832c-28615b255cb3

    with osmosis as ( select tx_from, trunc(block_timestamp,'week') as weeks
    from osmosis.core.fact_transactions
    where block_timestamp::date >= '2022-01-01'
    )
    ,
    weeks as ( select tx_from, count(weeks) as total_week
    from osmosis
    group by 1)
    ,
    active as ( select tx_from
    from weeks
    where total_week >= 20)
    ,
    Ethereum as ( select FROM_ADDRESS, count(DISTINCT(tx_hash)) as total
    from ethereum.core.fact_transactions
    where block_timestamp::date >= '2022-01-01'
    group by 1)
    ,
    eth_active as ( select from_address
    from ethereum
    where total >= 10)
    ,
    polygon as ( select FROM_ADDRESS, count(DISTINCT(tx_hash)) as total
    from polygon.core.fact_transactions
    where block_timestamp::date >= '2022-01-01'
    group by 1)
    ,
    pol_active as ( select from_address
    from polygon
    where total >= 10)

    select 'Osmosis' as chain , count(DISTINCT(tx_from)) as total, count(DISTINCT(tx_id)) as total_tx
    Run a query to Download Data