mlhDaily Active User5
    Updated 2022-10-20
    SELECT week,
    COUNT(DISTINCT(tx_from)) as total_wallet,
    sum(total_wallet) over (order by week asc) as cum_wallet
    FROM (SELECT date_trunc('week', day) as week,
    tx_from,
    count(*) as actvie_days
    FROM (SELECT date_trunc('day', block_timestamp) as day,
    TX_FROM
    FROM osmosis.core.fact_transactions
    where tx_from in (select tx_from
    from (select DISTINCT tx_from
    from (select tx_from,
    count(DISTINCT tx_id) as trxs
    from osmosis.core.fact_transactions
    where TX_STATUS = 'SUCCEEDED'
    group by 1
    )
    where trxs >= 10
    )
    )
    and day >= '2022-01-01'
    group by 1, 2
    )
    GROUP BY 1,2
    )
    WHERE actvie_days >= 4
    GROUP BY 1
    Run a query to Download Data