KaskoazulBots and success rate bot vs human
    Updated 2022-04-25
    with daily_count as (
    select date_trunc ('day', block_timestamp) as fecha,
    count(distinct tx_id) as interactions,
    tx_from as users
    from terra.transactions
    where fecha >= CURRENT_DATE - 60
    and fecha < CURRENT_DATE - 1
    group by fecha, users
    order by interactions desc
    ),

    max_number as (
    select users,
    max (interactions) as max_interactions
    from daily_count
    where users is not NULL
    group by users
    ),

    BOT_SUCCESS as (
    select t.block_timestamp::date as fecha,
    --t.tx_status_msg,
    --t.gas_used,
    --t.gas_wanted,
    --m.msg_type,
    count(t.tx_id) as txs
    from terra.transactions t
    inner join max_number n
    on t.tx_from = n.users
    inner join terra.msgs m
    on t.tx_id = m.tx_id
    where fecha >= CURRENT_DATE - 60
    and fecha < CURRENT_DATE - 1
    and max_interactions > 25
    and t.tx_status = 'SUCCEEDED'
    group by 1
    Run a query to Download Data