Pmisha-bmlMdxevent.over.time
    Updated 2022-06-03
    with t1 as (select
    --date(s.BLOCK_TIMESTAMP) as dt,
    b.MSG_TYPE as events,
    count(distinct TX_FROM) as active_user
    --sum(active_user) over (order by dt asc) as cum_active
    from osmosis.core.fact_transactions s left outer join osmosis.core.fact_msg_attributes b on s.tx_id=b.tx_id
    where s.tx_id is not NULL
    and TX_STATUS='SUCCEEDED'
    and s.BLOCK_TIMESTAMP>='2022-01-01'
    group by 1 order by 2 desc limit 10)

    select
    date_trunc('day',s.BLOCK_TIMESTAMP) as dt,
    b.MSG_TYPE as event,
    count(distinct TX_FROM) as active_user
    --sum(active_user) over (order by dt asc) as cum_active
    from osmosis.core.fact_transactions s left outer join osmosis.core.fact_msg_attributes b on s.tx_id=b.tx_id
    where s.tx_id is not NULL
    and TX_STATUS='SUCCEEDED'
    and s.BLOCK_TIMESTAMP>='2022-01-01'
    and event in (select events from t1)
    group by 1,2
    Run a query to Download Data