nitsEthereum Most Popular Strategies by bots
    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_bots as (
    SELECT * ,'bots' as type
    from thorchain.swaps
    where from_address in (select distinct from_address from bots
    ) and blockchain = 'ETH' ) ,
    strategy as
    (SELECT from_address,pool_name, from_asset,to_asset , count(*) as total_txs,row_number() over (partition by from_address order by total_txs desc ) as rn from txs_bots
    GROUP by 1,2,3,4 )
    SELECT from_asset, to_asset,pool_name, sum(total_txs) as total_interactions, count(DISTINCT from_address) as total_bots
    from strategy
    GROUP by 1 ,3,2
    order by 4 desc
    limit 1000
    Run a query to Download Data