mariyaLUNA Staking and Trends
    Updated 2022-05-11
    --active
    with t1 as(select
    block_timestamp,
    msg_value:sender as active_users,
    count(tx_id) as transactions
    from terra.msgs
    where msg_value:sender is not null
    group by 1,2
    having transactions>3)

    select
    date_trunc('day', block_timestamp) as dt,
    count(distinct active_users) as daily_wallets
    from t1
    group by 1