headitmanagernumber of swaps
    Updated 2022-04-27
    with bots as (select distinct trader from terra.swaps where MSG_INDEX > 0 and block_timestamp::date >= DATEADD(month, -1, CURRENT_DATE) )
    , users as (select distinct trader from terra.swaps where MSG_INDEX=0 and block_timestamp::date >= DATEADD(month, -1, CURRENT_DATE) )

    select count(*) , block_timestamp::date as date,'Bots' from terra.swaps where trader in(select trader from bots )
    and block_timestamp::date >= DATEADD(month, -1, CURRENT_DATE)
    group by date
    UNION
    select count(*), block_timestamp::date as date,'average Swappers' from terra.swaps where trader in(select trader from users )
    and block_timestamp::date >= DATEADD(month, -1, CURRENT_DATE)
    group by date


    Run a query to Download Data