nitsEthereum Bot Addresses
    Updated 2022-07-18
    with bots as (
    select date_trunc('minute',block_timestamp) as min, from_address, count(*) as txs
    from thorchain.swaps
    group by 1, 2
    having txs > 6
    ),
    txs_non_bots as (
    SELECT * , 'non-bots' as type
    from thorchain.swaps
    where from_address not in (select distinct from_address from bots
    )
    ),
    txs_bots as (
    SELECT * ,'bots' as type
    from thorchain.swaps
    where from_address in (select distinct from_address from bots) and blockchain = 'ETH' )

    SELECT date(first_use) as day, count(DISTINCT from_address) as total_addresses, sum(total_addresses) over (order by day) as cum_addr from
    (SELECT from_address, min(block_timestamp) as first_use from txs_bots
    where blockchain = 'ETH'
    GROUP by 1 )
    GROUP by 1

    -- SELECT date(block_timestamp) as day, count(DISTINCT tx_id) as total_txs,
    -- sum(total_txs) over (order by day) as cum_txs
    -- from txs_bots
    -- GROUP by 1

    -- limit 1000
    Run a query to Download Data